Correction to: Record which promise set each variable.

Our current Promise may be a copy, that'll be free()d at the end of
the current convergence pass; comparing this to the Promise of a later
assignment won't be equal even if it's the original (or another copy
of it); and dereferencing it during reporting shall be regrettable.
Fortunately, a Promise's .org_pp records the original in any copies,
so we can record that instead, bypassing both problems.
Make testall test what's in the current folder, not `dirname $0`.

This is so that it can be called directly from masterfiles.
Export variables to tests so we can find the enterprise plugin.
Redmine#1900: test basic template and trailing newline
Merge pull request #1289 from ediosyncratic/promise-fix

Correction to: Record which promise set each variable.
Merge pull request #1300 from tzz/test/readmine1900-cftemplate-newlines

Redmine#1900: test basic template and trailing newline
Merge pull request #1309 from kacfengine/testall_fixes

Testall fixes
Redmine#3184: acceptance test for editing immutable files
tests: make 01_vars/02_functions/00[12].cf work under archlinux
Merge pull request #1315 from cdituri/core/make-tests-work-under-archlinux

tests: make 01_vars/02_functions/00[12].cf work under archlinux
Follow /bin/sh style of variable exporting.
Incorporating feedback received via github

- Using "Call Collect" in a uniform way.
- Small code refactoring.
- Changed the name from CollectCallPending to CollectCallHasPending
Removing partial destructors
Removing partial constructors