Move legacy-test to test-base

Make it consistent with the test-mock and test-runner directories.
Also renames the files in api/ subdirectory.

(cherry picked from commit f779efd62cd579f67bd3b387d59fda11ee0cbe90)

Bug: 30188076
Test: make checkbuild
Change-Id: Ied3621e6201d8717223fe1ccd4ea77d458126b25
Merged-In: If4f99a65fcca416ede5b3e63481398f0b451bcb7
38 files changed