tls: cleanup onhandshakestart callback
Re-arrange and cleanup the flow of the onhandshakestart to be more clear and less repetitive. Exit early in the case of a first ever handshake for a given connection.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines