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.
@yagoulas you reminded me in IRC that this was intended to support additional users at some point in the future. This would allow us to track multiple stores in the same client to switch between them without having separate databases like we do in Development mode.