CRM-12984 backport of 4.4 test helper functions so tests will run

Conflicts:

	tests/phpunit/CiviTest/CiviUnitTestCase.php
Settings test Fix