Make sure to close all handles on eject drive

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Revert "Fixed issue #2071: TGitCache blocks Windows to eject USB drive"

This reverts commit 3956856e3e394a335ce63353446db3d6e145d71f.

Signed-off-by: Sven Strickroth <email@cs-ware.de>