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