Test Android specific SSLServerSocketFactory.getDefault() behavior

SSLSocketFactory.getDefault() will recompute the default if the set of
installed Security providers changers. That behavior is tested in the
test_SSLSocketFactory_getDefault_cacheInvalidate method of
libcore.javax.net.ssl.SSLSocketFactoryTest.

SSLServerSocketFactory.getDefault() has similar behavior and this adds
a new test class libcore.javax.net.ssl.SSLServerSocketFactoryTest with
test method test_SSLSocketFactory_getDefault_cacheInvalidate to test
that behavior. It is identical (apart from types) with the equivalent
SSLSocketFactoryTest method.

The Fake... classes that were nested in SSLSocketFactoryTest have been
extracted so that they could be reused for the
SSLServerSocketFactoryTest.

Bug: 118741276
Test: atest core-tests:libcore.javax.net.ssl.SSLSocketFactoryTest
Test: atest core-tests:libcore.javax.net.ssl.SSLServerSocketFactoryTest
Change-Id: Iacae1087db0363cc0858097974ff3621a4d77a16
6 files changed