Catch SecurityExceptions from socket connects.

Prior to android 4.3, the system would throw a RTE instead
of an IOException for certain types of failures.

See change 50144 on the android open source process.