Fix WatchServiceTest.test_singleFile flakiness.

Files.write from time to time generates two EVENT_MODIFY
events instead of one. Added code to test to handle this
case.

Test: CtsLibcoreTestCases
Bug: 35346596
Change-Id: I0636f1914821a3510494699a4659c0ceafdf928d
1 file changed