HTTP_Request2_SocketWrapper would never time out on an fgets() call as
discussed in issue #281https://git.gnu.io/gnu/gnu-social/issues/281
I'm patching it here by setting the socket to non-blocking mode and
using stream_select to wait until the timeout. This patch or some
similar variant must be implemented in HTTP_Request2_SocketWrapper
to avoid the same issue for other users.