Fix crashing fetch tests by setting keepalive = false

When keepalive = true (the default), additional IDLE requests are sent
to the IMAP server. The mock IMAP servers in the tests are not set up
to respond to the IDLE request.
Fix fetch crash when all parts come back immediately

Resolves "TypeError: Cannot set property 'ended' of undefined" if
bodies are sent immediately and no msg is added to the fetchCache.
Fix formatting
Merge pull request #251 from rossj/master

Fix exception when all fetch bodies return at once