DHT Locking

Grab a RLock object on running any method of a DHT object. Supposed to fix #801.

The lock is an RLock, so nested locks don't cause deadlocks.

The lock object had to be made public, since in connection.py, inCryptoPeerConnection.cb()  there is a piece of code that works with dht.activePeers().
No problem, I'll do it.

Moreover, could this piece of code go actually to a more generic / accessable location for other classes to use it? I remember the db layer is using locking too, and I suspect others will. This might be a good moment to talk about strategies about locking, or at least providing a simple API for others so they don't have to reinvent it all the time. (Of course a PR is not the best place for strategic conversations, if we do have one, we might start one there.)