Refactor SocketManager's timeout queue
SocketManager changes:
* Remove timeout queue elements on socket closure. Until now it was
possible to make the timeout queue grow because its elements were not
removed upon socket closure.
* The queue now contains only socket numbers of corresponding
m_socketDescriptionVector elements. The code responsible for timeout
updates in the queue is no longer neccessary and has been removed.
* Modify the timeout queue only if corresponding socket has a timeout
enabled.
* Remove unnecessary 'open' and 'timeout' socket flag check if a
timeout occurs. Only the main thread modifies these flags. If there's
a timeout, it must have been triggered by an opened socket with
timeout enabled.
Growing queue test changes:
* Compare timeout queue size and connection count in the SocketManager
thread.
* Assume that first AcceptEvent is triggered by the most reccent
connection attempt.
* Match client and server sockets to properly detect CloseEvents.
* Add more stress to the test with more initial connections.
* Throw std exceptions from SocketManager thread.
* Wrap SocketManager thread in an object. Check a possible exception in
the destructor.
* Get rid of unnecessary timeouts.
Change-Id: Icd63696a58c4ef6a66c2e487819423df610ca580