[DLC vNext] Create StatsLogger helper class and add tests

As discussed offline and in
https://googleplex-android-review.git.corp.google.com/c/platform/packages/modules/DeviceLock/+/24931993/comment/6e634f44_4c3950d5/
, adding this helper class to facilitate better testability. These
tests now utilize a constructor that takes a StatsLogger object as a
parameter, letting the tests to inject mocked object to the classes
under test. Ideally, this should be done with a dependency injection
framework like Dagger. But because we have not have that set up yet,
I will add dependency injection as a separate task.

The basic idea here is to separate the interaction with the
auto-generated class from the Android dependencies, so in this way, we
can test the StatsLogger class and its dependency (the auto-generated
class) as a pure java class rather than having to utilize robolectric,
which has been causing trouble for us due to its incompatibility with
ExtendedMockito.

Test: atest DeviceLockControllerRoboTests
Bug: b/305984988, b/259302076
Change-Id: I11a9cd0c363fe277a22ec7e332f9fee48419ed8f
11 files changed