David Petraeus, the former director of the Central Intelligence Agency and a retired military general, has signed court papers indicating he will plead guilty to a misdemeanor charge of mishandling classified information in exchange for a prosecutor’s recommendation he serve no jail time.