Merge pull request #287 from raoulwissink/master

Fixed broken EXPUNGE event
Parser: attempt workaround for broken mime encoded words

Some MUAs appear to break multi-byte characters across encoded word boundaries, which goes against RFC2047.

This change attempts to work around this by trying to concatenate broken encoded words that are separated by linear white space.
switched error text to prefer whatever is in info.text field even in case of oauth error
Fix for servers with LOGINDISABLED before STARTTLS

When connecting to a server that advertises LOGINDISABLED in its
CAPABILITIES before STARTTLS, the connection raises an error and
destroys the socket before completing STARTTLS.  This is demonstrated in
the following debug output:

debug: [connection] Connected to host
debug: <= '* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS LOGINDISABLED] Dovecot ready.'
debug: => 'A0 CAPABILITY'
debug: <= '* CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS LOGINDISABLED'
debug: <= 'A0 OK Pre-login capabilities listed, post-login capabilities have more.'
error: Error: Logging in is disabled on this server source=authentication
debug: [connection] Closed

It appears that a return after _starttls was overlooked (since _starttls
will call _login again once the STARTTLS has completed).

Signed-off-by: Kevin Locke <klocke@quantpost.com>
Reattach 'readable' event listener when changing streams

Parser was not unregistering the 'readable' event listener from the old
socket, nor registering it to the new socket when setSocket() was
called.  This caused event handling to stop during the STARTTLS handoff.

Signed-off-by: Kevin Locke <klocke@quantpost.com>
Merge pull request #292 from meetmikey/master

switched error text to prefer whatever is in info.text field even for oauth error
Merge pull request #291 from kevinoid/starttls-fixes

Fix broken STARTTLS
Connection: change style for hasNonASCII()
deps: update stringencoding to cadce3b692b0
Handle undefined quota list response when set quota on some imap server (e.g. cyrus)
Merge pull request #294 from wavify/setquota-undefined-quotalist

Handle undefined quotalist when set quota on some imap server (e.g. cyrus)
update readable-stream dependency version
bump version
lint
readme: rephrase notes about fetch() and body part sections
readme: add note about 0.7-0.8 upgrade guide
Added spaces to get fetch 'bodies' examples working