EasyUnlockPrivateApi: Fix crash circumstances on shutdown.

* Declare BrowserContextKeyedAPIFactory dependency on
  ApiResourceManager, which EasyUnlockPrivateConnectionManager directly
  depends on.
* Don't try to deref if the returned connections list is null.

For the sake of posterity, I was unable to reproduce these crashes, but
it appears they are happening in the wild under unknown circumstances.
This change contains hardening for real issues, so monitoring of crash
reports once this change goes out is required.

R=khorimoto@chromium.org

Bug: 850765
Test: none
Change-Id: I347a6c4126e8b02f9caea14adeb81dc9b9b26aff
Reviewed-on: https://chromium-review.googlesource.com/1143599
Commit-Queue: James Hawkins <jhawkins@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576573}
4 files changed