Cache Git repository size(s), update cached size after receive-pack

Computing the occupied disk size for a repository is expensive. Cache
the repository size to avoid computing it for every receive-pack.
Implement the PostReceiveHook to get notified when a new pack is
received and increase the cached repository size for the size of the
received pack.

The cached repository size is currently only increased for the size of
the received pack. The pack size is the most significant contributor to
the increased repository size and the quota doesn't need to be
byte-precise. The size of the newly created references or reflog entries
is not added to the cached value of the repository size. This could be
improved in a follow up change.

Change-Id: Ia6be19c7f40b31301cf0431efd366566d7254a43
3 files changed