Reland 'Smart Lock: Clear stale ProximityMonitor on disconnect.'

The original commit (crrev.com/c/1479941) was reverted
(crrev.com/c/1480309) because of usage of unitialized memory.
Specifically, the MockProximityMonitor object had been deleted but was
then derefenced.

Patch 1 is the original commit, Patch 2 is the fix.

Original commit message:
UnlockManager was previously holding onto a stale
ProximityMonitor from its first connection. That meant
that if a disconnection and subsequent new connection
occurred, the old ProximityMonitor, with an old reference
to the previous connection (represented as a ClientChannel
object) was used. This always resulted in a Smart Lock
failure for a second connection, and occasionally, a crash.

In order to correctly reset the ProximityMonitor object,
the way that it is called had to be refactored (remove
completely unneeded ScreenLockBridge logic), in order to
consolidate calls to one place.

Bug: 931929
Change-Id: If8d7b48efe0055b8d0afc2f4cd3954114c0b7a71
Reviewed-on: https://chromium-review.googlesource.com/c/1481613
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Ryan Hansberry <hansberry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634330}
3 files changed