Introducing sanitizer callbacks in transport layer

Currently, there is no sanitization of the incoming data. A malicious node or a bug in our side could end up with a message that crashes all connecting nodes. I believe issues #659 and #655 exist because of accepting unprepared data.

Please note that this PR does not sanitize the messages in the transport layer but it does the first step by introducing sanitizer callbacks that need filling. A sanitizer callback will be executed before the actual callback and its purpose is to make sure that the incoming messages are well-formatted (for example, the right keys exist, it is fixed-length, it contains valid data). Every callback should strictly come with a sanitizer.
Not sure what the convention with the return value here is, but this feels inappropriate:

* If `1` is used to indicate success, we should switch to `True` instead.
* However, the `sanitize` name indicates that this function doesn't simply *check* for sanity, but it fixes any malformed input if it can. Otherwise it should be called `validate`?
* Since exceptions are used to indicate an erroneous condition, we don't need to return anything in case of success.