Composer autoloading when running tests. fixes #1472

Adds composer autoloading to the ``run-tests.php``script and the code template for PHPUnit test cases.