Implement rev query parameter for HEAD, GET, PUT and DELETE requests.

While we're at it, please add `local_seq` to `UuidIndex` as well.

And add `rev` key to `RevisionIndex` as well. Then both indexes contain the same information which good for consistency.