SSL enhancements:

- new SSL related events: start handshake, complete handshake, secure closed-
- enhance SSL state machine
- add unit tests