Fix sequence number-based functions and do not connect to the server before all event handlers are attached first
Fix sequence number-based functions and do not connect to the server before all event handlers are attached first

Fixes #46
Fixes #26

icemilo/node-imap,parro-it/node-imap,phgrey/node-imap,mscdex/node-imap,ClientSuccess/node-imap,modulexcite/node-imap,rltvty/node-imap,Yubin/node-imap,potato620/node-imap,craigp/node-imap,signpost/node-imap