Add test using maplist for dynamic inputs

Ref Redmine:3315
Redmine #4203: Fix software reports having "env" as package manager.
Merge pull request #1599 from nickanderson/redmine/3315-maplist

Add test using maplist for dynamic inputs
Redmine#3442: added staged test in 10_files/templating/staging/array_expansion.cf
Fix RealPackageManager() when first word is "env".

Because the index of the first space after env is 3, not 4, we need to
make sure that it doesn't depend on the "< 4" check.
Fix consecutive spaces in RealPackageManager().

We should skip over them.
Merge pull request #1624 from kacfengine/env_package_manager

Redmine #4203: Fix software reports having "env" as package manager.
Merge pull request #1629 from jimis/reverse_dns_access_rules

Reverse dns access rules
Merge pull request #1630 from jimis/reverse_dns_access_rules

Typo.
Do not segfault on type checking NULL Rvals.

Add unit test. Close #5416
Hostname access_rules check now uses SearchLongestPrefix()

This way, host "www.cfengine.com" will match to the rule ".cfengine.com"
but not to the rule "cfengine.com".

Also it won't happen by accident that "www.cfengine.com" matches to
".com" rule if present together with ".cfengine.com".

Also reshuffled the logic a bit.
Fix reverse lookup in TLS connections.

Because there is no CAUTH command in the new TLS connections, we have to
reverse-lookup the connecting IP address, so that we can check the
admit/deny access_rules later. With this patch we do that *only if*
there are any admit/deny hostname rules. Thus the ugly global
NEED_REVERSE_LOOKUP.

To perform the reverse-lookup within each spawned thread and minimise
latency, we are passing the struct sockaddr that accept() returned to
the spawned thread by (ab)using the ConnectionInfo struct. In the future
I expect the ConnectionInfo and the ServerConnectionState structs to be
unified, ideally with all sub-pointers and sub-allocations merged.
Acceptance tests for admit/deny access_rules using hostnames with new protocol.

Actually they contain subtests for both protocol versions, but the old
protocol is commented out because of our buggy connection cache we can't
have different protocol connections open to the same host.