Refactor connection.py and network_util.py

### Motivation
Refactor code in `node/connection.py` so that it is easier to read and test. DRY network code inside `network_utill.py`.

### Changelog
* Use `tornado.netutil` to check for valid IPs. Drop home-brewn code.
* DRY code via `node/network_util.py`.
* Drop unused code and attributes.
* Refactor `PeerConnection.send_raw`, `CryptoPeerConnection.start_handshake`, `CryptoPeerConnection.send` to bring failure cases in front and avoid multiple nested `if` and `try` statements.
* Turn `Transport.shutdown` into abstract method, since it isn't supposed to call `self.listener.stop` any more.
* A bunch of other minor changes and fixes.
Shouldn't this be `if not guid`?