Ensure imap connection is disconnected