Prepare for removal of legacy-test from default targets

In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

Bug: 30188076
Test: make checkbuild
Merged-In: I0b573e69af8827d6068ba5217c85d7707597caf5
Change-Id: I50a52c7a2f313cdea0effa09e51b26b36a737de7
5 files changed