Fix for flaky tests: do not use background thread.

Tests are sometimes failing because a background thread is used to fetch
contact details.

This commit provides a way for tests to specify that such processing is
not needed.

Change-Id: Idd367e4add83349bcd2c7ed9306d0aa178b85230
2 files changed