Fix NPE in DozeTriggers and Add Tests

I created a FakeProximitySensor object that made it easy to reproduce
this NPE in tests. Includes some small refactoring around the
ProximitySensor.

Bug: 141364041
Test: atest SystemUITests
Change-Id: I8a5977a56ab1a36a74fac9d0423769131c1b380b
7 files changed