Switch core-tests-support to @CorePlatformApi

Rather than depending on internals, switch core-tests-support
to using the core platform API.

core-tests-support had a static dependency on the platform
bouncycastle target which included a copy of the repackaged
bouncycastle in CTS. This copy would then not be used. This looks
like a mistake. After this change a copy of bouncycastle is included
under its original package.

TestIoUtils was relying on a hidden method in java.lang.Math. This
has been replaced with public API calls.

Bug: 113148576
Test: build
Test: Ran CTS: cts -m CtsLibcoreTestCases
Change-Id: Ib8045537c2c191aca3f416cc459f265c8d957dfc
6 files changed