Introduce a mocking model for dht_state.

We mock the routing table and the network stack. This allows us to test the state
system without having to worry about the correctness of the underlying implementations.