Make TLS use optional
Add more error checking for malformed packets
Make OpCodes typed
Refactor request packing/unpacking routines
Add OpToHash() to ease interop with crypto libs
Add test server implementation
server: refactor a bit of common key-checking code