Reapply 5e465f4 Add a timeout to the client socket.

If the client hangs up silently, the socket will remain open on the
server's side. This keeps the connection from the server to the VM
open and prevents that user from reconnecting.

Now if there's no data received from the client socket for some period
of time (currently hard coded to 60 seconds), the server will terminate
the connection, freeing up the VM for reconnects.

This isn't a perfect solution since it will hang up on a still functional
client if they are idle too long. Turning on a sensor or the performance
measurement pings in the client will function like a keep-alive. The iOS
client currently lacks either of these, but a minute timeout should be
sufficiently long that we can expect to get some touch screen input that
will keep the connection alive.

Change-Id: Idf286fac67cd92705222a2ab8e40e3b5d50f5582