Replacing IP parsing with IPAddress

IPAddress implements correct ip parsing according to the relevant RFCs.
I replaced the current parsers which were prone to error with it.
Fixing a warning about no return from function
Renaming files to follow the convention
Moving documentation to the header file.
Removing an unneeded else statement

This removes a warning saying that the function returns nothing.
IO related unit tests for TLS

The tests included in this commit relate to tls_generic.{c,h} and cover
the IO parts of the TLS protocol.
I rewrote the TLSRecvLines function to make sure we get the first line,
and there are no possibilities of exploiting our parser.
Changing the API for IPAddress again

Ted's commit for sorting ip addresses used the old API, therefore there is
little point in trying to impose a new API. It was easier just to use
the old API than to try to change Ted's commit.
Renaming TLSRecvLines to TLSRecvLine

The function was modified to only receive only line, that is it will
receive data until the first '\n' is found.
Rewording error message
Merge pull request #925 from cduclos/tls-protocol

Tls protocol