switch imap.js to use node net/tls modules instead of TCPSocket directly...

... so we can more easily redirect in a worker