Added an idle function and changed script to use imaplib2 if available.
Added example demonstrating use of idle function.
Switched the tag and keyword args when using imaplib2's _command_complete as
it expects (rqb, kw) rather than (kw, rqb).
imaplib2's untagged_responses seems to be in a list format rather than the
dictionary format imaplib uses. Now if imaplib2 is being used untagged_responses
is automatically converted to the dictionary format using a simple function.
Not sure if this is the ideal solution though.