WIP Almost complete refactoring and unit testing of routingtable. Minor refactoring of kbucket.

Very WIP. I will describe tomorrow; really tired now.

### Bugs found:
* Many operations are potentially thread-unsafe.
* The `replacement_cache` isn't synchronized once a `KBucket` is split.
No, we shouldn't. This is the `KBucket`'s range, not its contact count. It's contact count is already large, and this is why we are splitting it. While it may be the case that one of the new buckets isn't as full as the other one, this has nothing to do with the range per se.