DataUsageSummaryPreferenceTest converted to JUnit

There are couple of newly explored concepts in this CL, which will
hopefully be useful for migrating other tests in the future as well. In
broad strokes, the changes to this file cover:

Android build file species the preferences library, in order to access
PreferenceViewHolder.createInstanceForTests.
Resource ids in JUnit tests differ from the Settings apk. This is true
not only of strings but also views and layouts. Helper functions added
to main class to access the layouts needed by the test.
Shadow activities are not needed to view layouts, the context can be
used.
Context startActivity can be mocked and verified in order to capture and
examine the intent created by the library under test.

Bug: 175389659
Test: atest -c DataUsageSummaryPreferenceTest
Change-Id: Ib8cb87f0299c47a32c3f5d3af7edb20592b727ec
diff --git a/tests/unit/Android.bp b/tests/unit/Android.bp
index 7556cbe..b857a0a 100644
--- a/tests/unit/Android.bp
+++ b/tests/unit/Android.bp
@@ -18,6 +18,7 @@
         "androidx.test.espresso.contrib-nodeps",
         "androidx.test.espresso.intents-nodeps",
         "androidx.test.ext.junit",
+        "androidx.preference_preference",
         "mockito-target-minus-junit4",
         "platform-test-annotations",
         "truth-prebuilt",