The general who seized power in a bloodless coup and later led a reluctant Pakistan into aiding the U.S. war in Afghanistan against the Taliban.