WASHINGTON — In a memoir, Gen. Stanley A. McChrystal, the former American commander in Afghanistan, writes that tensions between the White House and the Pentagon were evident in the Obama administration from its opening months in office.