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
I don't think so. `g._celery_tasks` is a `list`, and I can't think of any way that `list#append` could raise a `ValueError`. But I see your point--we could always change data structures later on in a way that makes `RuntimeError` too general. How about:
```python
try:
    tasks = g._celery_tasks
except RuntimeError:
    signature()
    return
if signature not in tasks:
    tasks.append(signature)
```