Windows test suite fixes.

A bunch of windows test suite fixes.

    before:
    Ran 876 tests in 32.271s
    FAILED (failures=42, errors=62, skipped=17)

    after:
    Ran 877 tests in 51.534s
    FAILED (failures=2, errors=91, skipped=28)


Most of the remaining errors are in rmtree in the teardown methods:

    WindowsError: [Error 32] The process cannot access the file because it is being used by another process: '<path to pack file>'


These will be fixed by a "with Repo.readlock():" solution.