Implement an overall timeout for ReceiveCommits

ReceiveCommits does a lot of work, potentially involving RPCs to remote
servers that may have long timeouts. If something really goes off the
rails, e.g. a database RPC hanging forever, we want to be able to kill
stalled ReceiveCommits threads.

Note that the timeout is only for ReceiveCommits, not for the various
steps in receive-pack processing that happen before that, like actually
reading the data from the wire or indexing the pack. So the amount of
time should really be fairly well bounded; even so, the default timeout
is a relatively high 2 minutes.

Change-Id: Ib9e8045faff9a9acaefd8c55ecc46757b4f54e02
3 files changed