finally fix the bug that caused lots of non-deterministic weird behaviors
(multiple listeners were spawned for single socket)
fix a warning
move things around
stop the listener when handshake fails. add a relevant test. fix some warnings.
make test suite threaded
TODO is fixed, enable the test