Use with-file-modes when creating mail directory

`with-file-modes' was introduced in Emacs 24.5, but that should be
widespread enough by the time BIC is ready.
Actually use UID when saving messages

FETCH responses always start with a sequence number, even if they are in
response to a UID FETCH command.  Get the UID from the attribute list.
Implement "early callbacks", and use them for FETCH responses

If there are many messages, it's better to process them as they come in,
rather than wait for the tagged response to the FETCH command.