Increase default cache length
Add delay to handle mismatched certificates
Handle errors "during" connect

If a socket error occurs during the connection process, flag the socket as retired so it doesn't get added to the pool for use.
DRY some socket handling code.
Added some more debug logging

Much more work needed here.
Use socket provider for feedback.
Improved buffer servicing for multiple connections
"namespaced" properties used on sockets.
Tightened conditionals to apply to legacy mode
Removed a redundant JSON.stringify
Added some guidance for an error scenario.
Cache Length checks

Fixes #196
Emit "drain" notification

When the queue is empty and all notifications have been transmitted to Apple emit an event.

Also tidied up some of the shutdown handling code as this shares some logic with the above.

Fixes #199
Added a connect timeout

When a connection takes longer than 10 seconds to establish there is likely a problem. This value is configurable.

May help with issue #191
Fixed a test failure
v1.6.1
Merge branch 'develop'