Mark's networking code

As cleaned up by @ediosyncratic using git filter-branch (among other dangerous tools).
Includes several fixups from later in the branch, but I may have missed some.
Compiled locally and passes all unit and acceptance tests.  Let's see how it fares more widely ...

I suspect reviewing the gross diff is easiest, as there are (even after squashing out a few) quite a lot of changes of mind along the way.  Also: 106 commits.
To be clear:

`PROMISE_RESULT_NOOP` -> promise was already kept, cf-agent didn't change anything; log level VERBOSE
`PROMISE_RESULT_CHANGE` -> cf-agent changed the system; log level INFO
`PROMISE_RESULT_FAIL`, `PROMISE_RESULT_TIMEOUT` etc -> cf-agent saw need to change the system, but failed to do so; log level ERR

This is how it's (reasonably) consistently done in our existing promise types. Compliance reporting will deliver error messages with LOG_LEVEL_ERR to the Enterprise server if a promise is not kept so that $operator can see from within the reports what has gone wrong. INFO or VERBOSE output is not included there.