Fixing arrays hashing.

To avoid having the same hashes for variables like a[10] and a1[0]
array boundary hash moved above index hashing.
Test case testing multi-index array hashing updated.

Now cases like a[10] and a1[0] covered while checking if hashing is
working accurately.
Fix test relying on ordering of array elements returning by mergedata.

This one is simple change of expected strings. We can think how to modify
this test in future to sort the merged array elements before comparing.
Merge pull request #2036 from pasinskim/redmine_6674

Fixing arrays hashing.
support dry-run for mustache templates. Redmine #6739
tag mustace acceptance tests with story_id 5535
Merge branch 'redmine_6739'
cf_popen() generates an error message on distributions where ifconfig cannot be found during IPv6 discovery, affects RHEL 7
cf_popen() generates an error message on distributions where netstat et al cannot be found during monitoring probing, affects RHEL 7
Revert "Fix fakeroot messing up a test by moving it to the unsafe area."

This reverts commit 1b9a58d50783e46e3a46790de76beff3a9a6b7b7.

Still doesn't work correctly, will disable the test instead.
Disable test that has problems with stale processes.
Revert "Fix test for new output"

This reverts commit 4dc8e6bb436d4233f7647c75224275281b86e0ea.

Conflicts:

	tests/acceptance/04_examples/outputs/check_outputs.cf

Bogus commit.
Make sure remake_outputs.pl fails when passed wrong options.

It was failing silently for a long time because a wrong argument was
erronously given to it.
Fix examples output after fixes 0f84c0c4e0f and b87c03c1c8.
Redmine #6602: Fix LMDB max_readers setting being too low under load.

We did not previously take cf-hub into account when calculating how
large the max_readers setting can be. In the worst case, every thread
in both cf-serverd and child in cf-hub can have it open at the same
time, as well as occasional cf-agents, so account for that.

Also, improve the error checking when setting the maximum readers.
LMDB will only succeed at setting the maxreaders limit if no other
database handles are open, including in other processes, despite
always returning success. This means that we should check afterwards
whether the value we tried to set was honored, and warn if it wasn't.
If there is a window of opportunity where the database is not open,
the problem will correct itself, but if the load is so high that the
database is constantly open, then the administrator may have to take
action and restart CFEngine.

Also moved this to the database opening code itself, so that it is
active for every database. This way we won't hit the problem again in
some future unforeseen database.
Redmine #6602: Enable LMDB NOSYNC mode on hub to improve performance.

NOSYNC mode will prevent excessive fsync'ing to disk, esp. with the
busy lastseen database. This opens up to corruption issues if the
machine is unexpectedly shut down or crashes.

For the lock database we solved the corruption issue by making atomic
backups of the database and restoring it on restart, but this method
is not generic and needs to be adapted if we want to the same kind of
protection for other databases (see Redmine #6817). For now we
consider the corruption issue an acceptable compromise since a hard
shutdown is quite unlikely in serious production environments, and the
performance is quite bad in this area.

On agent nodes we keep the SYNC flag on, since they are much less
impacted by the performance problems (they do not serve thousands of
CFEngine clients), and fixing corruption on agent nodes is
operationally more work.
Merge pull request #2044 from kacfengine/max_readers_fix

Redmine #6602: Fixes for MDB_READERS_FULL errors
Added 3.6.2 changelog, it was forgotten in the 3.6.x branch.
changelog update
Wrapped at 78 columns.