gitserver: use an atomic alternative to os.RemoveAll
Created by: ijt
Fixes https://github.com/sourcegraph/sourcegraph/issues/3972
Test plan: This PR includes a unit test, including a sub-test for atomicity.
Created by: ijt
Fixes https://github.com/sourcegraph/sourcegraph/issues/3972
Test plan: This PR includes a unit test, including a sub-test for atomicity.