ContactsProvider2 optimization: Performing name and email lookup entirely in the database

Instead of loading name lookup rows into memory and constructing a query to
find matches, do the whole thing with a single query.

Stats:
Baseline:  880 yield points, 97 ms per yp,  objects: 1265 per yp
Optimized: 880 yield points, 88 ms per yp,  objects: 1196 per yp

Bugs: http://b/2148604, http://b/2148605

Change-Id: I444e5739e555bb7a6fdd144ac7a5f37930bffed0
3 files changed