Adding a new event type: EVENT_CONNECT_FAIL

This should be triggered where a connect attempt has failed. This allows connection observers to react to connect failures; previously this was not possible.
Emit an EVENT_CONNECT_FAIL event when stream connect fails.

This is triggered when stream_socket_client() returns FALSE (indicating the connection attempt failed.)
Emit an EVENT_CONNECT_FAIL event when EventBufferEvent connect fails.

Refactored the error handling into a method. This now notifies EVENT_CONNECT_FAIL where an error is received and we're in a disconnected state.