Removed for loop in SocketInfo::initSocket()

There's no point for the for loop since connecting happens outside of this function
Removed redundant closing of sockfd
Added SocketInfo::initSocket() unit test
Added placeholders to log to console
Fixed spelling
Added SocketInfo::initSocket(const int &port, const string &host) unit tests
Use SocketInfo::throwSystemError() where needed