update.gc: check_and_set_needsgc before fetch
Since check_and_set_needsgc is all nice and neatly bundled up in a
function now, call it just before starting a mirror fetch in addition
to the call after a successful fetch.
This helps avoid excess pack buildup when the fetch itself succeeds
in fetching a pack but Git refuses to complete the update for some
reason (perhaps because a malicious Git-impersonation has attempted
to update a ref/heads/... ref to point at a non-commit object) thus
causing a "bang" exit.
Without this extra check, the excess pack cleanup would not take
place until the next regularly scheduled gc run which could potentially
be many days away.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>