Task improvements.

Make sure req is initialized to NULL.
Schedule a task on the event loop only when bound to a request.
Don't call module onloads until after everything is initialized.

This means the onload functions for a module are now called
after a worker has started and never from the parent ever again.