Git test framework failing on windows

FileUtils.delete cannot remove read-only files, and some of the files
creating by EGit/Jgit within the test repositories (.git/objects files)
are set as read-only, leading to test failures because we cannot
clear up the test workspace after each test.

This also changes the test framework to using try-with-resources where
potential errors were identified.

Change-Id: Ibfb54584cc7ccdcae09e56abe0b1c79001e68394
11 files changed