yui/yeti — pull request #27 by reid (2013-02-27 19:15:54+00:00)
Title: Quit process after browsers quit, introduce end event

If Yeti starts its Hub in the same process as the Client, the process can exit when the `complete` event fires. This will be before launched browsers have been told to shutdown.

Introduce the `end` event, which is fired after all cleanup on the Batch has occurred. Only quit the process after the `end` event is fired. If no browsers were launched, `end` fires after some final cleanup occurs after the `complete` event. Otherwise, `end` fires when browsers have been told to shutdown.

Also fixes leftover bustage in WebDriverCollection from the rename of agentManager to allAgents.