Consider connection lost if IDLE response is late

Wait for 10 seconds after sending DONE in order to exit IDLE.  If we
haven't received the response then, consider the connection lost, move
to the disconnected state, and attempt to reconnect.
Truncate lines in mailbox view buffer