Refactor APEX e2e tests

This is a preparation change to make them run in both full and userspace
reboot modes.

Defining test cases in a base class inherited from the actual test
classes is a design smell, but it's the best tradefoff between purity
and implementation cost that I was able to find.

Bug: 148767843
Test: atest --test-mapping system/apex/tests
Change-Id: Ibf0070acd7f6722f0c12c1b910c8c37a0dc269c4
Merged-In: I6494bc0cc00b86103fc41ecb9c5466f9a1089a57
16 files changed