The example file docs/examples/websocket.c does not work out of the
box, because the recv_pong() function does not consider that the
curl_ws_recv() function might return CURLE_AGAIN if there is no data
to read, causing the program to terminate prematurely.
This commit addresses this by using select(2) to make receiving pong
blocking, and thus being able to continue with the main loop.
This also occurs in the example file sendrecv.c, which also makes use
of select(2) for sending and receiving data, which I based on for
this commit.