Package p2p (PoC7)

Here we go. That took a bit longer than expected.
The tests could be better, but we can improve them while integrating PoC 8 changes.

@zelig PTAL
This is still part of #155.
Error codes are meant to be used as an argument to `newPeerError`. They shouldn't be used on their own.
The panic ensures that `newPeerError` can only be called with valid error codes. Using it with an unknown error code
would be an (internal) bug and therefore panics. The panic will have newPeerError and its caller on the stack and should indicate the source of the problem.