Add automatic retry of failed tests (in CMake builds)
CTest offers an option to automatically retry failed (or timed out) tests.
Since we have a few tests that are not stable and may fail because of environmental issues (e.g. overloaded machines), we should enable the retry.