Added deferred execution support

This should solve issue #362.

A global 'wait' function is added so the test files can pause mocha processing and generate
tests asynchronously. The function returns a semaphore with a single method 'resume' to continue processing test files.