Defend against bad extension ContentProviders.

Add defensive null checks and try/catch blocks in case an extension is
using a different database schema or introduces another bug in their CM
Home ContentProvider.

Change-Id: Ib2a4986bec23456c1f9adfb6dcb66fc562610d0e