Allow a clean exit.

After fixing #6, it was found that the threading model made qimaptray
unable to exit cleanly. A pipe is now created and can be used to exit
the currently waiting poll.

For now, once an imap object has stopped, there is no way to recover
it for later, but that might change to fix task #12.