Carry over bugfixes from MediaProvider.

A few months ago MediaProvider forked SQLiteQueryBuilder and we
fixed bugs in how the new insert(), update(), and delete() methods
were executed, but those fixes never made their way back upstream.

This CL is a clean cherry-pick of existing logic.

Bug: 155149941
Test: atest android.database.sqlite.cts.SQLiteQueryBuilderTest
Change-Id: I00d2ee88539b12d27a2ed99fff0546d1e3543b0e
2 files changed