Lincoln turned defeated rivals into the cabinet that won the war