This also restores the old module structure of having separate
`peer_pool` and `rlpx` modules. This is made possible by the
new Nim package `package_visible_types` (please refer to its
README for an explanation).
Also introduces more error handling in the low-level RLPx routines.
All detected errors will result in immediate disconnection of the
corresponding peer, which may be detected in the protocols though
the `onPeerDisconnected` event handler.
This was done because a cycle was formed between the structures
of the three modules:
- A Peer holds a reference to its Network
- The Network holds a reference to its PeerPool
- The PeerPool keeps a table of connected Peers
I could have resolved the issue by introducing a new types module,
but it would have required all of the currently private fields to
become public (due to lack of package-level visibility in Nim).
Instead I decided to merge the modules because they were relatively
small anyway. Please note that the former `P2PServer` type is now
called `NetworkConnection`. There are slight changes in the APIs
that will be carried out in Nimbus when merging this.