Add an IDLE thread to the daemon

This just automatically starts up the IMAP IDLE thread and runs it in
the background while everything else runs.  This is going to be
necessary in order to deal with network failures.