Merge remote-tracking branch 'GitHub_orig/master' into xrg-3.6

Conflicts:
	cf-runagent/cf-runagent.c
Merge branch 'feature-bwlimit' into tmp3.6-2

Conflicts:
	cf-agent/cf-agent.c
	cf-serverd/server_transform.c
	libcfnet/net.c
	libpromises/generic_agent.h
Merge remote-tracking branch 'GitHub_orig/master' into tmp3.6-2

Conflicts:
	cf-runagent/cf-runagent.c
Merge remote-tracking branch 'GitHub_orig/master' into tmp3.6-2

Conflicts:
	cf-agent/verify_packages.c
Merge remote-tracking branch 'GitHub_orig/master' into tmp3.6-2
verify_packages: fix usage of CfReadLine, const Promise decorator

These functions have been a custom extension, now need to port them
to latest API.
mon_network.c: only free vbuff after we're done using it

These two 'for' loops are still using 'vbuff' after it was free()d.
Merge remote-tracking branch 'GitHub_orig/master' into tmp3.6-2
Merge remote-tracking branch 'GitHub_orig/master' into tmp3.6-2

Conflicts:
	cf-runagent/cf-runagent.c
	cf-serverd/server.c
	cf-serverd/tls_server.c
Merge remote-tracking branch 'GitHub_orig/master' into tmp3.6-2

Conflicts:
	libcfnet/classic.c
Merge remote-tracking branch 'GitHub_orig/master' into tmp3.6-2
verify_services: bail out with error if some service cannot be resolved

Rather than the assertion (which can even be no-oped in compile time),
which would kill cf-agent, exit the promise with a failure.
Redmine #2971: reset SIGPIPE signal handler to have a sane behavior of piped commands within child
Merge remote-tracking branch 'GitHub_orig/master' into tmp3.6-2
const-qualify two char* args.

In files_names.[ch], IsNewerFileTree() doesn't need to modify its dir;
nor does JoinSuffix need to modify its leaf.  So don't invite callers
to cast away constness in order to call these functions ...
Clean-up globals in cmockery.c

Some were unused, the rest could be declared static.  One was only
used via strcmp(, "file_writer_test"); replaced it with the bool
result of this comparison.
Don't be stupid in how we use formatting functions.

One use of sprintf() where strcpy() would do.  Many uses of
vsnprintf() to a buffer that's then output, where vfprintf() would
avoid the risk of truncation, save the need for a buffer and do the
job directly.  (Also: each fprintf(out, "%s", buffer) should have been
an fputs(buffer, out) in the first place.)
Various format fixes for printf-style formatting.
Initialize uninitialized array !
Unused variable fix.

Don't bother with an intermediate variable when all you're going to do
with its value is assert it's NULL.  When NDEBUG is defined, the
variables were set but not used ...

Also change tests to use assert_true (testing checks) instead of
assert (program-level failures), prompted by Kristian's review
comments.