Fixes cases when a contact was deleted via the contacts app.

In this case, the contact id of the raw contact is nulled out. This has the
side effect of making the IN clause of sqlite never equal.  Similar to:

SELECT 1 as id WHERE id NOT IN (SELECT null);

always returns 0 rows because the comparison to null is always false.

Protect against this case by eliminating null contact ids.

Bug: 11826565
Change-Id: Ide9b150bb7f94d03c210d43dbc8cdd5c42c21cf9
(cherry picked from commit 9fc2d9abb7b5034e86006d360ba49c8b1b55058c)