Clean up KV REST API code a bit.

+ Move the rest code out of its own package and back in /kv.
+ Make the tests more consistent with others throughout the project.
+ The REST server now satisfies the http.Handler interface.