I think I got the bug causing the above-mentioned random crashing under Windows fixed. To be honest, I could not figure out what exactly caused it, but it definitely had something to do with the PacketSession object being deleted indirectly from one of its slots. All the slots, which may lead to the object being deleted, are in QueuedConnection mode to avoid exactly a crash like that. It may have been a race condition, who knows?
Anyway, before the HandshakeSession would directly call functions of Handshaker, now signals and slots are used. The code can be cleaned further (e.g HandshakeErrors may go to a separate header to avoid including HandshakeSession.h in Handshaker.h) but that would come in another patch.
Above is a link to the patch.
