Fix #286
Fix #286

resource manager eats up more that 100% CPU if client disconnects without freeing resources

As it turns out, the resource manager doesn't close the socket when it receives 0 from recv.
From man recv:

  Return Value

  These calls return the number of bytes received, or -1 if an error occurred.
  The return value will be 0 when the peer has performed an orderly shutdown.

Instead of detecting that the client has closed the connection, resoucemgr keeps calling recv in an infinite for loop (see common/sockets.cpp)

Signed-off-by: Philip Tricca <fd418754d31777cf39b16b99b0350486ab840079@intel.com>

tpm2-software/tpm2-tss,tpm2-software/tpm2-tss,01org/TPM2.0-TSS,tpm2-software/tpm2-tss,01org/tpm2-tss,01org/TPM2.0-TSS,01org/TPM2.0-TSS,01org/tpm2-tss,01org/TPM2.0-TSS,01org/tpm2-tss