Fix compilation on Mac.

Fixes issue 3167.
Merge pull request #871 from tzz/tzz/feature-sys-variables2

new sys variables: inputdir, masterdir, libdir, bindir, failsafe, update, local_libdir
Merge pull request #867 from kacfengine/mac_compile_fix

Fix compilation on Mac.
Merge pull request #856 from tzz/tzz/zendesk-1083-replace-patterns-acceptance-test

basic replace_patterns and match.1/match.0 acceptance tests
Remove global PROMISETIME, use GenericAgentConfig::policy_last_read_attempt
Reload policy files in daemon based on which files were parsed in previous load.
Factor out ReadPolicyValidatedFileMTime from GenericAgentIsPolicyReloadNeeded
Check access from source files in policy, rather than from InputFiles
Add inputs attribute to body file control

This lets you include files from other files, allowing for easier
maintenance of modular policies.
Merge pull request #872 from tzz/tzz/feature-sys-variables3

fix sys.libdir; fix and rename sys.update, sys.falsafe
Example documentation.
Move unstable/failing test into staging
Redmine#1884: Add ^context=xyz specifier to module protocol, with acceptance test