Write CTS test for DeviceStateChanged metric

It is for making sure that device state changes send the desired
metrics. Queries the device using an adb command for all the
possible device states, then switches to all the possible states
one after another.

Bug: 181542365
Test: flash device with framework changes then $ atest DeviceStateStatsTests
Change-Id: I3e435c9be17482fe704f4d30b43a257571c6a4ad
3 files changed