Redmine#6725: refactor the local class matching functions and add tag support to them
Redmine#6725: add acceptance tests on classmatch() and countclassesmatching()
Move some tests around for better grouping.
Redmine #6623: Fix agents constantly retrying long running promises.

The expireafter default should be two hours, but it was erronously set
to one minute in the initialization code, so remove that and stick to
the globally set value.

This fixes the problem where, when transferring a large file that
takes longer than the execution interval to finish, no agent will ever
succeed. What happens is that if a second cf-agent starts downloading
the same file, locking will not prevent the attempt, despite already
being in progress by the first agent. No agent will ever succeed,
because the second agent will delete the temporary file created by the
first agent, then create its own temporary file, which will be deleted
by the third agent, and so on.
Merge pull request #2026 from kacfengine/wrong_expireafter_default

Redmine #6623: Fix agents constantly retrying long running promises.
Redmine#6725: add tag examples for classmatch() and countclassesmatching()
Merge pull request #2023 from tzz/tzz/redmine6725-tagify-class-matching-functions

Redmine#6725: refactor the local class matching functions and add tag support to them
Redmine #6766: Work around bug in system headers on HPUX 11.23 IA64.

The definition using mpinfou inside /usr/include/machine/sys/getppdp.h
is supposed to be protected by an "#ifdef KERNEL", but it's missing.
Since fixing it properly requires changing the system, we instead fix
it by defining a dummy structure. Since it is a kernel structure it
will never actually be used anywhere.
Merge pull request #2030 from kacfengine/broken_hpux_system_headers

Redmine #6766: Work around bug in system headers on HPUX 11.23 IA64.
Suppress failure on Solaris 11 due to process selection failure.
Redmine#6674 Modifying hashing function to add info about index boudaries

When using multi-index arrays hash function is looping through each
character in index without modifying hashed value once moving form one
index to another. That's why entries like a[te][st], a[tes][t], a[t][e][st]
and all other variations are resulting in having exactly the same hash.
While trying to add new array entry to RB tree having the same characters
in indexes previous entry is updated instead of new one being created.
Adjust acceptance test for Redmine#6674
Fix test relying on specific order of getindices.

As getindices returned list is not guaranteed to be in any specific
order we should sort the results before comparing expected and actual
test results.
Merge pull request #2033 from pasinskim/redmine_6674

Redmine#6674 Modifying hashing function for multi-indexed arrays
Fix broken variables tree iteration.

This fixes whole number of problems with iterating through RB tree
containing variables. Especially:
https://dev.cfengine.com/issues/6033
https://dev.cfengine.com/issues/6779

EvalContextVariableTableIteratorNew is calling VariableTableIteratorNew
which is not aware of variable indexes (VarRef->indices). Then while picking
value form tree to be iterator it might or might not contain indexes.
Randomly selecting variable with wrong index (and number of indexes)
is causing wrong behavior while iterating through list of variables.
VariableTableIteratorNext is checking indexes and returning variables
based on VariableTableIterator selected previously by
EvalContextVariableTableIteratorNew which is totally unreliable in case
of arrays.
Fixing arrays hashing.

To avoid having the same hashes for variables like a[10] and a1[0]
array boundary hash moved above index hashing.
Fix relaying on order of keys returned by maparray.
Test case testing multi-index array hashing updated.

Now cases like a[10] and a1[0] covered while checking if hashing is
working accurately.
Disable problematic acceptance test completely on Solaris 11.
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.