Add test to catch subsequent scans of nomedia directories

Directories with .nomedia files should only be scanned once (unless the
parent directory is moved). We do not scan directories with .nomedia
file if the string in .nomedia file matches the file path of the
parents directory (this is usually set in the first scan).

Since we do not have strong benchmarks to compare these numbers with,
we are using Timers to compare numbers relatively.

Extracted Timer logic to a utils file for easy access by all tests.

Bug: 173156814
Test: atest ModernMediaScannerTest
Test: atest PerformanceTest

Change-Id: I2f83721ef0ec2bc92f80c11c8a7e7ffc73123723
6 files changed