IMAP: replace self-pipe event with a timeout event