Respond to API feedback for directory names.

We have public APIs to set "primary" and "secondary" directory names
when contributing new media, but we don't have a way to read out that
information once an app targets Q.  So define columns to provide API
symmetry.

Also, since these are called "primary" and "secondary", it's
confusing to have a "secondary bucket ID" defined, so rename that to
be a "group ID" instead.

Since this is a major schema change, recalculate all columns that
are derived from file paths.

Fix bugs where we tried dropping SQLite internals when wiping the
schema of a database, which would have always failed.

Bug: 115377970
Test: atest MediaProviderTests
Test: atest cts/tests/tests/media/src/android/media/cts/MediaScanner*
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ide4bcbdc88e467cb90e8f8e670580c4b2845408a
4 files changed