Make the FileSummaryRecord.periodic_flush test more reliable
The original implementation of FileSummaryRecord.periodic_flush
is too sensitive to fluctuations in the performances of the host machine.
The change I'm proposing is more constrained an should not fail if the machine is too slow.
I also modified the implementation of the auto-flush feature to avoid a race condition (detected by chance).
Edited by Marco Clemencic