gitserver: extract creating and deleting of tmp directories for repo tests to separate function
Created by: sashaostrikov
Follow up to https://github.com/sourcegraph/sourcegraph/pull/34276 for further test writing convenience
Test plan
No functional change, existing tests should pass