CTest: more aggressive implementation of ctest_empty_binary_directory()

Make sure that CMakeCache.txt is the last file being removed since
the binary directory may be left in a state that is no longer
removable otherwise.

Also retry removal a couple of times which makes this more robust
on windows where file locks may temporarily prevent removal.
Merge topic 'robust-ctest_empty_binary_directory' into next

35fbc10 CTest: more aggressive implementation of ctest_empty_binary_directory()