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

Please add a test that does `GET` and `HEAD` with `if-none-match` header to ensure the right revision is returned.