Redmine#5667 - address ps -axo shift on FreeBSD 10.0-RELEASE and later

As discussed and documented in Redmine#5667 , there's an inevitable creep to the right going on in FreeBSD 10 and later which has been demonstrated to break bootstrapping in a severe fashion. Going with the most elegant fix, which is to just say 'auxw' in line with Darwin, which is closest for these purposes. Output and column starts do not change, just guarantees getting complete lines regardless of terminal width. Quick test shows no impact.
Note that columns with -axo DO variably shift now on 10 and later, so systems with long runtimes trying to bootstrap are likely to encounter the described bug.
(cherry picked from commit 50df6902f08648fb82a5aa9758af17bad38d27a2)

Conflicts:
	libpromises/classes.c
Merge remote-tracking branch 'upstream/3.6.x' into 3.6.x
My own ChangeLog entries, plus some cleaning up.
(cherry picked from commit 92938c507a120b9d777f4819cf34430bdc0f494e)
Revert change to libcf-agent building.

It causes every source file in cf-agent to be built twice.

(cherry picked from commit b5531b33d19dd43ea32ef49072a2c40b8a9c09c5)
Fix potential hang in unit/logging_timestamp_test

If Log() fails to deliver even one newline, the fgets() later in the
test shall hang indefinitely.  So make sure we send a newline to
stderr after the Log(), to prevent that.  This shouldn't affect the
validity of the timestamp in what's sent ...

(cherry picked from commit c163ac6f2bd0c53822ef4e837fb99af299b3501c)
Reindent - no functionality changes.

(cherry picked from commit 639b08702cc71b00b3ac44401ddfbef3d2aac5d2)
ps comamnd on linux we can specify the width of fields. The rss size is too small for us and cfengine complains:
 - Unacceptable model uncertainty examining processes

This fix issue:
 - https://dev.cfengine.com/issues/6337

(cherry picked from commit e2bbfa43b6094949b6df0ef47d2c052c050ad47c)
Redmine 4822: cf-serverd, always admit access to remote "root" user.

Also reshuffled the logic in TransferRights() to make it more clear.

(cherry picked from commit 9b8d0aa12d986dd7961424403dff42464bb2dcd0)
Beautification, no functionality change.

(cherry picked from commit e1aa9beee1b574437508c4ddd8be7ec91fb3ddca)
New protocol now sets conn->uid exactly like the classic protocol.

(cherry picked from commit 812a622e6190e80740ac95225f624aee860fd9bc)
Use CF_UNKNOWN_OWNER instead of arbitrary numbers.

(cherry picked from commit 3c16e70d8521d1b2dcc083ec234a9ae618ddc6ab)
Removed bogus comment. That's not true any more, somebody changed the ItemList to a Seq.

(cherry picked from commit ce0e75ececc492cced9bfd49b860fdc8fc56aedf)
Fixed very very old race with getpwnam().

(cherry picked from commit 2be6e9aef7e979bbdbbb11f86d92d382c9e1342e)
Fix harmless printing of warning on Windows.

(cherry picked from commit 0a42a2cd17976a69de9d52d66831b67f40c7294d)
logging, indentation.

(cherry picked from commit 8c6786302d1d25f6fb770e10b6bc81bb3fc0bde7)
Make sure VERBOSE variable is exported to testall sub-invocation.

(cherry picked from commit 2cd924d5d66337f1e1bf8c7f36b3a2779abcb9e0)
Redmine #4822: Fix incorrect background invocation on Windows.

You cannot use shell backgrounding on Windows. And the daemon cannot
daemonize either, so the correct means is to let the promise run in
the background.

(cherry picked from commit 9df513a14205cee5a4622ac77e9d8bd39d29b487)
Redmine #4822: Fix incorrect sleep invocation on Windows.

(cherry picked from commit a361e5c592432cef079d3f7e11c67a121e0199d0)
Redmine #4822: Fix incorrect "tee" invocation on Windows.

(cherry picked from commit 3b8bfe67eace06e3ffaaf8f2ae98046696b34b6d)
Fix annoying error message when failing a test.

The maximum variable size is 4096, so set it to that instead. It
potentially won't display all the content, but it's only for display
anyway.

(cherry picked from commit be59cbed598a1785d8881f8b2b02ad8440332ac7)