Enable Task.join/interrupt to work outside of the event loop for tasks of the same thread. See #443.

This makes it possible to use those functions outside of a task before the event loop has started, or when the event loop is manually run using processEvents().