Migrate to using our own SQLiteQueryBuilder.

We keep making various tweaks and improvements to the platform
version to improve security and functionality, but our hands will
become more tied over time as we lose the ability to update it as
part of a Mainline update.

The biggest motivating factor for this is an upcoming change that
will create separate databases for each storage device, which would
require substantial surgury on the upstream API surface without any
other customers.  Thus the easiest path forward is to simply make
ourselves a copy and modify it locally.

This change is a purely mechanical copy of the existing code from
the framework with adjustments to build in an unbundled environment.

Bug: 143722813
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I9b7d34c748f1b2e0269d14c437126fd7cbcd4d37
8 files changed