Minor retouch.
Set protocol version to the one negotiated. Will be needed when we have more than one versions inside TLS.
Identification dialog now only needs one roundtrip

Changed identification dialog to send two lines at once from the client
(protocol version and client identity) so that we save one network
roundtrip.

Had to bring back TLSRecvLines() for that purpose (why was it removed in
the first place?), to make sure that no bytes will be lost when
receiving, even if TLS squeezes multiple lines in one record.
Output serverd start message after daemonisation.
Added memmem() replacement in libcompat, and simple tests.
We currently only have snprintf replacement for C99.

Unfortunately we can't yet use C99 for sprintf(), fprintf(). But we
*can* for snprintf() (and Log() which calls snprintf).

Also removed an unnecessary cast.
Fixed stuff according to code review.
Added memmem() tests suggested by @ediosyncratic.
Merge pull request #1603 from jimis/protocol_roundtrips

Protocol roundtrips