Remove unused global variables
Don't set $(match) during process selection and DeleteItem*

This causes EvalContext to disappear from significant amount of code.
Move SelectItemMatching to the place of use
Move MatchRegion to the place of use
Move a few $(match)-setting functions to cf-agent.
CFEngine functions ought not to reset $(match) context

Hence, they should not use FullTextMatch function
Move BlockTextMatch/FullTextMatch to cf-agent, as only useful there

Those functions set $(match) scope, which is only well-defined for
cf-agent (indeed, there is a check inside to only set it for
cf-agent). Hence any use of those functions outside of cf-agent
is a bug and has been eliminated.
Don't check for agent type, it's always cf-agent
Instead of using $(match) scope, return captures from matching function

This change makes a few CFEngine function implementations to use
matches returned directly from the StringMatchCaptures instead of
relying on side-effects of FullTextMatch.
Fix escape() testsuite

Previous tests were broken due to way regmatch() matched strings.
Remove unused VSHIFT variable
Remove obsolete comment
Fix default value for repchar attribute
Initialize all global variables explicitly

Also mark complicated cases as such
Merge pull request #1244 from dottedmag/cleanups/fix-globals

Cleanups/fix globals
Redmine#3905: acceptance test for perms on a directory with a trailing slash
Merge pull request #1247 from tzz/test/3905-perms-on-directory-with-trailing-slash

Redmine#3905: acceptance test for perms on a directory with a trailing slash
Fix incorrect Log statement.
Fix incorrect function name in Solaris 9 code.
Don't rely on _INT64_TYPE define, it is not available everywhere.

unint64_t should be pretty safe to assume is available.