internal/router: bulk metadata API implemention

We also fix all paths so that they start with / after splitting. This makes them compatible with the usual way that paths are specified in URLs.
I didn't make the change because it seemed like additional unnecessary code churn in a PR that was already a bit too big.

Breaking the commonality is actually a good thing in this case (IMHO) because it would be wrong for the JSON handler function to use the ResponseWriter. If it did, it could break things (for example, if the client set the response code, the JSON handler could not set the encoding type of the response). If a handler really needs the ResponseWriter (for example, because it needs to set some custom headers in the response), it can always avoid using HandleJSON, which is only a trivial wrapper after all.

By omitting the ResponseWriter from HandleJSON, we make it clear that the output of the handler is implied by the returned values (interface{}, error).