Improving kv test coverage

* Adds unit tests to kv/local_kv.go and kv/dist_kv.go
* Generalizes gossip network simulation so that it can be used in tests which require gossip networks
* The unit tests for kv/dist_kv found a user permission bug which led to false positives. This is fixed in storage/prefix.go.

I'm brand new to Go, so I would appreciate any advice!
I'm unclear what you mean by this TODO. A local KV doesn't always span the key space from KeyMin to KeyMax. Usually they'll just have a sparsely populated version of the complete key space, becoming every more sparse as more stores are participating in the larger cluster.