CtsTestServer: make it possible to trust certs.

Instead of always using a hardcoded invalid cert that expired a long
time ago, allow tests to pass a key and cert (as IDs of raw resources)
to CtsTestServer, in DER forms.

Generate two key/cert pairs (valid for 10 years, with localhost and
127.0.0.1 as subjectAltName entries) and check them in; use network
security config to mark one of them as trusted by CtsWebkitTestCases.

This makes it possible for tests in CtsWebkitTestCases to specify which
cert/key they want to use and get an appropriate result, instead of
having to always accept the invalid certificate.

No tests are updated by this change; these will be tested and enabled
individually. This just introduces the infrastructure and certs for it
to work.

Bug: 177895415
Test: atest CtsWebkitTestCases
Change-Id: If9b6e6ac48da796ef0a03a2165e80d010f9f6676
8 files changed