cf-serverd: free getaddrinfo() result, on error of OpenReceiverChannel()

getaddrinfo() may allocate the 'result' struct even in cases where it
will return an error. Take care to free memory, although we would exit
the server process anyway.
cf-serverd: getaddrinfo() will use a numeric port, no lookup

This `AI_NUMERICSERV` flag avoids looking up the "services" table for
a string port resolution, according to the manual.
cf-serverd: getaddrinfo() will NOT set "errno" upon failure

It has its own `gai_strerror()` function to resolve its (reentrant)
result code.
Add acceptance test for list extending itself
cf-serverd: fix typo for addrinfo constant

As spotted by Dimitrios Apostolou
Redmine#4694: fix prefixing public client key file in cf-serverd by username
Add test for variable expansion in meta attribute

Ref: Redmine:4885 (https://cfengine.com/dev/issues/4885)
Redmine#4889: check that unresolved variables are not allowed in promisers
Set attribute_name to "none" to hide it from the UI.

Completes b789ca9171480c345a07c608ebd88981ea85e6a2
Redmine#4719 validating user name both forr classic and TLS protocol.

If there are some characters in the user name we assume is invalid
connection with the client is terminated.
Merge pull request #1566 from tzz/test/redmine4889-unresolved-variables-in-promisers

Redmine#4889: check that unresolved variables are not allowed in promisers
Improve regexp to avoid failures on HPUX

We were looking for two strings in output, and for that purpose used two
regcmps. One of those included '.*' after the desired string in
question, the other just '*'. The latter failed on HPUX because of spam
emitted for every cf-agent run, so the regcmp failed.
Merge pull request #1569 from pasinskim/escaping_username

Redmine#4719 validating user name both forr classic and TLS protocol.
Merge pull request #1463 from pasinskim/tls_server_username_fix

Redmine#4694: fix prefixing public client key file in cf-serverd by user name
Redmine#4889: move test to staging
Fix agents downloading policy every 5 min.

Multiple causes led to this. First, the addition of a checksum in
cf_promises_validated. Since we don't guarantee that the masterfiles
directory on the hub and the inputs directory on the agent are the
same, the checksums could easily be different. This would lead to the
agent regenerating the cf_promises_validated, believing it to be
wrong, and then overwriting it again with the file from the server, in
an endless loop. Fixed by relying on timestamp once again, not
checksum.

Also, move the generated file back to masterfiles. Because a
cf_promises_validated is downloaded from the server, its modified
timestamp will be newer than the timestamp contained within it, which
will trigger regeneration. Next time around the same thing happens.

Also moved the internal validated_at config value out of the
GenericAgentIsPolicyReloadNeeded() function to avoid a const cast.
Remove checksum testing and comment out timestamp testing.

Redmine 4907. Checksums aren't used anymore, but timestamp checking
should be fixed in the test.
Correctly name packages for Beta 2
Merge pull request #1570 from kacfengine/cf_promises_validated

Fix agents downloading policy every 5 min.
Add missing const.