Save Gmail labels as folders on sync start.

This also means that we properly create folders for labels which have no
associated messages, which we don't currently do.
imaplib.IMAP4.abort should trigger conn pool discards too.
Document our different query.get() semantics.
Do IS [NOT] NULL in a pep8-compliant way.
Truncate folder names if they're too long.

Due to database limitations, we can't store labels longer than 191
characters, though Gmail labels may be up to 225 characters.