Reimplement media scanner in managed code.

The platform media scanner has served faithfully for many years, but
it's become tedious to test and maintain, mainly due to the way it
weaves obscurely between managed and native code.

This modern reimplementation is bug-faithful to the legacy scanner,
with tests to confirm that media is scanned identically.  Future CLs
will flesh out the remaining features and add additional tests to
confirm behaviors around hiding/showing directories.

Eventually this will also extract XMP metadata from images.

Current benchmarks show legacy performance:
    Scan Initial: 5175ms [220, 1, 94, 94]
    Scan No-op: 333ms [0, 0, 0, 0]
    Scan Clean: 111ms [-191, 0, -93, -93]

Compared with similar modern performance:
    Scan Initial: 5822ms [207, 1, 94, 94]
    Scan No-op: 331ms [0, 0, 0, 0]
    Scan Clean: 170ms [-191, 0, -93, -93]

Bug: 120791890, 122263824, 120862852
Test: atest com.android.providers.media.MediaScannerTest
Change-Id: I938b18f7c6cd5309a6b9c4eb97e635d6151b4ead
12 files changed