Fix tests that fail on some Android devices

Some tests fails on some Android devices because they have
larger buffer sizes. Setting the buffer size of sockets used
in tests that rely on blocking behavior ensures consistency.

ThreadInterruptTest#interruptWritingRequestBody
URLConnectionTest#writeTimeouts
Merge pull request #1169 from nfuller/FixTestOnAndroid4

Fix tests that fail on some Android devices