More robust pack file rename on Windows
Simplify the existing solution for DiskObjectStore._complete_thin_pack
and repeat it for MemoryObjectStore.move_in_pack that has the same
need.
Checking the platform before unlinking was needed before since
WindowsError was caught, which is only defined on Windows. Since this
is a subclass of OSError, there is no real need to be that specific.
The platform check can remain as a minor time saver, since it seems to
be guaranteed that unlinking is never necessary on other platforms.
Another alternative could be using shutil.move, which silently
replaces existing targets. Python 3.3 and newer also have os.replace
for similar functionality.
The previous code comment mentioning that a possibly existing target
file should have the same content as the source file seems to be false,
which is the reason for
test_object_store.DiskObjectStoreTests.test_repack_existing failing on
Windows. This commit should mend this test.