Fix deadlock in MediaProvider

Replace the global sGetTableAndWhereParame used by various methods
with as-needed allocations to avoid unnecessary synchronization.

Bug: 37957260
Test: ran MediaStore CTS, took pictures
Change-Id: I8b365f0edfb50c24484eff5d51b5a92422c8e4fc
1 file changed