Delay volume state changed broadcasts until the Storage Service processes it

In R, all file path access is proxied through the Media Provider database.
This change ensures that the filesystem is indexed in the database
before broadcasting volume state mounted. This is essential as we do
not want apps to access the volume before the data is ready.

Similarly, the Storage Service processes other volume state changes before
broadcasting to other apps.

Since we want to block volume state changed broadcasts until the volume
is processed/scanned by the Storage Service, which may take time, so we
handle volume state changed in a separate thread (so as to not block its
callers like vold).

Bug: 145194312
Test: builds
Test: atest AdoptableHostTest
Test: atest com.android.tests.fused.host.FuseDaemonHostTest
Change-Id: I1677fdd5672cea531e98cda76d967af13e5fac9e
6 files changed