Rewrite parsing of sequence sets in handleFetch
IMAP: Merge sequence set handling in fetch and uid
IMAP: Use shared seqnum set parsing for store and uid store
IMAP: Use shared seqnum set parsing for copy
IMAP: Minor change to uid error message
IMAP: Remove unused variables
Set a flag after ServerHandlers are asked to stop

This adds a flag that is set when the handler should stop. On its own
this doesn't change anything because we already close the socket, but it
will make it possible to distinguish between socket errors and shutdown
requests (see next commit).
IMAP: Don't log error when handler stops due to shutdown
IMAP: Filter messages on uid not seqnum on uid store
Remove test that would always be true
Remove comment about search since it has been implemented
IMAP: Fix copy when receiving invalid message id
IMAP: Set recent flag after copying message
IMAP: Always return BAD when arguments are missing
Close IMAP socket after running test
Expand logout test to handle server closing socket
Kill and join imap thread after running tests
Join IMAP handler thread on test failure
IMAP: Add testcase for uid fetch with list of seqnums
IMAP: Fix a few broken tests