Fix SocketFactoryTest#test_createSocket_InetAddressIInetAddressI

With http://r.android.com/248420/, the order of BindException and
IllegalArgumentException got reversed as bind(localAddr) was invoked
before checking the correctness of the port. The change now corrects
the order in which the exceptions are expected i.e.,
IllegalArgumentException before BindException(IOException).

Also made a few changes in the tests to have a better understanding of the
actual failures.
Changes in the test:
 - Added
   test_createSocket_InetAddressIInetAddressI_IllegalArgumentException
   to have an independent test for IllegalArgumentException without
   having any ambiguity with BindException.
 - Added test_createSocket_InetAddressIInetAddressI_ExceptionOrder to
   verify the order of BindException and IllegalArgumentException.

Test: run cts -m CtsLibcoreTestCases

Bug: 31019685
Change-Id: Id7d761dcbb78b752247dc2fd469dfa5dc124ee66
2 files changed