Both socket mutexes in the HandleClientData-function could lock at the
same time and thereby locking the entire function.
The network handling has been significantly improved. Now waits for the
data available event instead of polling the socket 100 000 times/s.