Error handling and object creation improvements for TCPSocket:
* Rather than returning two possible states that need checking, TCPSocket_Create returns an error code which matches whether tcp_socket has been allocated or not.
* TCPSocket_CreateServer does the same, returning the error from the function and not storing it in error_state. The socket is destroyed on any errors during initialisation.
* TCPSocket_Destroy changed so that it can be used as an error recovery function from TCPSocket_CreateServer. Could have used a goto but this seems much cleaner.
* TCPSocket_PollStatus stores any errors in the status itself, reducing the number of results to check to one.
* TCPSocket_AcceptConnection works exactly like TCPSocket_CreateServer, with the exception that it's valid to return success with null in the client socket (representing no connection request made).
* Sending and receiving no longer has its own set of error codes requiring translation. This also allows full information in error codes to filter up through the function calls.
* Adjusted WebSocket to use this new convention.
* As a result, error_state has been removed from TCPSocket.
* Moved ShutdownNetwork call into socket destroy to avoid unbalanced calls.