Audit getaddrinfo() uses for proper freeing, redmine #6539.
Get rid of spaces between arguments on test help screen.

It makes it easier to read, since the number of options is getting
quite big.
Notice and act on changes to call-collect reporting interval.

When we CheckFileChanges() we may pick up a change of policy that
changes this reporting interval; be sure to act on any such change.
Implement parallel acceptance testing.

The implementation is based on generating a custom Makefile from
within testall, and then invoking a sub make command to execute the
tests in parallel. Since not all tests can run in parallel for various
reasons, tests that reside in a /serial/ or /unsafe/ directory will be
carried out serially.

Care has also been taken to ensure that timed tests will not hog the
make job slots, but unfortunately it has to occupy at least one slot,
which means that if your make -j flag contains exactly the number of
cores you have, one core will be mostly idle as long as any timed
tests are running. The recommended workaround is to raise the number
of jobs a bit above your core count (which is recommended practice
regardless).

The way the makefile is constructed is so that each parallel test has
its own rule, all the timed and serial tests each have one group rule,
and the serial rule is made to depend on all the other rules, so that
it runs last, and in isolation.

Note that for the sub make invokation to communicate with the job
server correctly, the testall script has to be run with a '+' prefix
from within the Makefile, hence it was removed from the TESTS variable
and executed manually instead.

testall was also changed so that it supports carrying out tests while
only writing to the workdir. This is necessary so that each invokation
will not overwrite each other's logs.

The parallel test harness of automake was considered (see
http://www.gnu.org/software/automake/manual/automake.html#Parallel-Test-Harness)
as an alternative, but was disqualified for a number of reasons. The
two main obstacles were:

- The list of tests has to be generated in configure, and cannot be
  easily regenerated on every run, which means that if you add a test
  it will not be picked up unless you reconfigure the project.

- Timed tests would be problematic because they have to run together
  in order to be efficient. If they don't, each test will wait its
  entire wait period before allowing the next test to run. Automake
  however, requires each test to be executed by a separate rule.
Carve up cf-serverd's StartServer() for readability.

The function had grown to over 200 lines; time for some housekeeping.
Broke out assorted chunks of it into local static functions, each
adequately self-contained, with names to make clear what's happening.
Make clean-up of lock-specific policy unconditional.

There's a policy used solely as framework for the promise whose lock
ensures we don't have two of cf-serverd running at the same time.
This is entirely disconnected from the policy potentially used by
threads, so there's no need to protect its destruction from happening
while there are threads running; it can be deleted as soon as its lock
is released.
Merge pull request #1929 from jimis/getaddrinfo_audit-redmine6539

Audit getaddrinfo() uses for proper freeing, redmine #6539.
Merge pull request #1920 from kacfengine/parallel_testall

Implement parallel acceptance testing.
Casting necessary for the case size_t is smaller than int.
Casting is not needed, but is good practice

Always cast negative values in unsigned types since in some cases bugs
might be hidden. See:

https://www.securecoding.cert.org/confluence/display/seccode/INT18-C.+Evaluate+integer+expressions+in+a+larger+size+before+comparing+or+assigning+to+that+size#INT18-C.Evaluateintegerexpressionsinalargersizebeforecomparingorassigningtothatsize-NoncompliantCodeExample%28size_t%29
Turn on reverse DNS lookups when there are admit_hostname rules.
Rename variable masking identically named variable of different type.
Clarification comment.
Acceptance tests for admit_hostnames and deny_hostnames.
Merge pull request #1932 from jimis/admit_hostnames_should_reverse_lookup

Admit hostnames should reverse lookup
Merge pull request #1927 from ediosyncratic/call-collect-reschedule

Support changing call-collect's schedule while running
Comment clarifications.
Merge pull request #1937 from jimis/master

Comment clarifications.