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.
I find this pattern a little overwhelming.

One I like better is to do

    testCases := []struct {
      ...
    }{
      ...
    }
    for i, test := range testCases {
      ...
    }