Fix a few parsing bugs that can allow for silent truncation of valid JSON
(cherry picked from commit c59c9276a91fbd02d486cef9ab8a3eaedceb1309)
Eliminate pointless intermediary in JsonParseFile()

We're going to write to the pointer we were passed in any case, so we
may as well pass that into the parser for it to write to, instead of
having our own local variable to passdown and then copy to the pointer
we received.
(cherry picked from commit 1812325c7e0fb8788056b7963ce01c56e6662543)
Hard error on JSON truncation
(cherry picked from commit cbf48eec43397a4891827b1c619bade63a80ac04)
redmine6549: Tolerate unrecognised escape sequences.

We have no way to represent \u{hex digit} escapes for Unicode, which
are perfectly valid JSON; so we need to tolerate these in some form
rather than choking on them.  Given that the only sane way to do so is
to preserve them verbatim, we may as well do the same for any other
unrecognised escapes.  This eliminates the need for an error code to
represent unrecognised escape.

Log() a warning when handling an escape verbatim, though; which, in
turn, requires a #include <logging.h>
(cherry picked from commit 95f8d71a59a064ad22535529da44a6ad958206f7)
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.
(cherry picked from commit 56eec440dd1b13c6c5e236af7b2a711c892250e9)
Update test result status for Solaris 11.

All cf-serverd tests are passing now, yey! Also remove freebsd, since
we don't test it in Jenkins, and the mentioned Redmine ticket is not
for that platform.
(cherry picked from commit daee0e3c72654c4a754eed3b073ae6be07bf29f8)
Redmine #6687: Keep promise result value when linking files.

Previously it was thrown away, which would give the correct class
outcome (thanks to cfPS), but the wrong compliance outcome, because it
uses the value of the promise result.
(cherry picked from commit a201ddd25e3895287e335af4b767313996e41b8b)