gc: implement "mini" gc
A "mini" gc is triggered when we have too many packs but it's not
yet time for a full gc. A git-svn fetch can also trigger a "mini"
gc in order to combine the git-svn fetched loose objects into a pack.
A "mini" gc attempts to reduce the number of packs by combining them.
This is generally much cheaper to do than a full gc.
If, however, that does not result in a sufficient reduction in the
number of pack files (packs with a very large number of objects are
not combined in a "mini" gc) then a full gc will be triggered as
a last resort (which will then happen the next time jobd processes
the project).
Other than for git-svn fetches, generally more than two updates
per day (an "update" being either a fetch or receive that actually
gets new objects) is required to trigger a "mini" gc before the
next scheduled full gc. And in the case of git-svn, that's still
the case in order for a "mini" gc to do anything other than just
combine the git-svn fetched loose objects into a pack.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>