Support configuring deadlines on server side

Allow to configure deadlines generically for requests by request type,
request URI pattern, caller and/or project pattern.

If multiple matching deadlines are configured the more strict deadline
(the one with the lower timeout) is applied.

Clients are able to override the configured deadlines by setting a
deadline on the request.

At the moment deadlines are only supported for REST, GIT_RECEIVE and SSH
requests but not for GIT_UPLOAD requests. Deadline support for
GIT_UPLOAD request may be implemented later.

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: Idc2a4ee7a82e7324911e8e58468131b3fa007404
diff --git a/Documentation/rest-api.txt b/Documentation/rest-api.txt
index 7d2781c..469bee5 100644
--- a/Documentation/rest-api.txt
+++ b/Documentation/rest-api.txt
@@ -258,6 +258,11 @@
   X-Gerrit-Deadline: 5m
 ----
 
+
+Setting a deadline on the request overrides any
+link:config-gerrit.html#deadline.id[server-side deadline] that has been
+configured on the host.
+
 [[updated-refs]]
 === X-Gerrit-UpdatedRef
 This is only enabled when "X-Gerrit-UpdatedRef-Enabled" is set to "true" in the