- Moves `env` and `generator` instatiation to `_onReady` so user have a chance to alter
the environment to the a specific way and expect `env` and `generator` reflects such
settings.

- Emits `ready` event right before calling `generator.run()` to allow any
last minute operation on the `generator`

- Deprecating `onEnd`, instead emits 'end' event as `generator.on('end')`

- Implement `withGenerator()` to mock generator dependencies

- accepts optional second parameter in `inDir` as a callback function.

fixes #564, #565, #573
factor out the common helper logic to register a list of dependent generators into an env.
(also change to use _.isArray for array type check)
Rename `_holdExec` to `async` and make it public (so `cb` of #inDir could use it to perform async tasks.
Rename `_onReady` to `_run` (since it is not really "ready" yet when it is called)
Merge pull request #570 from blai/master

RunContext enhancements