Support for headless testing

Need  a poller in the test suite to tell the JS test runner that all tests
have completed
Merge pull request #1 from eee-c/master

.