Fix missing "promise kept" status for the last line in a file.

For the last line we shortcut out using MatchRegion, but previously
we did not set the promise status.

Fixes issue 2943.
Autotest fails because of cached bundle result. Fix by splitting.
Merge pull request #805 from kacfengine/master

Reapply fix for issue 2943, and fix the failing test
Ignore result of this test for now.

After library split, promises.cf depends on cfengine version classes
and sys.version variables to be set.
Factor out DiscoverVersion in sysinfo, use in generic_agent_test:test_masterfiles
add check for support of vnsprintf/C99 compiler to fix runtime bug
Merge pull request #803 from McAtte/master

Fix solaris 9 unit test failure of policy_test