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
Verify expanded rval type before putting variable

Add acceptance test. Close #5302
Remove Rval/RlistShow, use Rval/RlistWrite
10_files/09_insert_lines/nothing_to_repeat_error.cf.sub: fix inadvertent breakage
Fix do not return PROMISE_RESULT_CHANGE from vars and class actuators

This impacted repair status indirectly for methods, and thereby services.

Close #5273
PromiseResultUpdate, do not let SKIPPED override NOOP.
Factor out RenderTemplateCFEngine, RenderTemplateMustache
Only commit mustache template to disk if rendering is successful

Use Buffer instead of Writer for MustacheRender. Redmine #5292
Restore BSD conditional fix

This change was bundled with another, and was subsequently lost when
permissions changes commit was reverted. See
https://github.com/cfengine/core/pull/1593
Permissions changes for FreeBSD/Solaris

The initial commit was reverted (see
https://github.com/cfengine/core/pull/1593 for background). Instead of
changing permissions for all nix systems then, differentiate between
(FreeBSD|Solaris) and others. This bloats up the tests, but hey.
Merge pull request #1606 from aappilattoq/master

Special bit permissions: take two ; restore BSD conditional fix
Various files were missing from the make dist tarball. Also fixed some whitespace issues.