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.

(cherry picked from 10260bd83b6365a02ed0224c8fe23011bfd6a7c1)

Bug: 30188076
Test: make checkbuild
Merged-In: I1f92750773e555cd3f09294e27a21f45888c8ea5
Change-Id: Idc6775cefb9e2abe999e20900799af8cab563595
1 file changed