Handle queued tasks when working outside request context.

# Purpose
Don't crash when a post-request Celery task is queued outside a request context. This happens, for example, when saving a `Node` from the shell.

# Changes
* If a task signature is queued outside a request context, execute the task immediately rather than waiting for the request to finish (since there is no request to wait for)

# Side effects
None expected