Add NULL checks in mobile provider code.

This CL adds checks for NULL db and provider in
mobile_provider_lookup_best_match and also adds checks
for NULL db and network_id in network_find_provider.
It also adds new unit tests for verifying the fixes.

BUG=chromium:206331
TEST=Ran unit tests

Change-Id: Iab5441d720b4a0aefbc326559501c6a656219bdb
Reviewed-on: https://gerrit.chromium.org/gerrit/55540
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Xinyuan Fan <shinfan@chromium.org>
Tested-by: Xinyuan Fan <shinfan@chromium.org>
2 files changed