Refactor and simplify the main task scheduling and poll loops:
* Make output handlers unregister themselves and call wait() to notify
exit listeners immediately. This makes the exit listeners more useful
for scheduling tasks. This makes the poll loop nice an clean because
it just calls the handlers and then the handlers can do the scheduling
when necessary.
* Make SequentialTaskQueue.add() and addFront() trigger scheduling
internally, so that it's more of a chain reaction than something that has
to be done explicitly.
svn path=/main/trunk/; revision=11013