Add awaiting external dependency predicate

cc @myronmarston 
This can be simplified to:

``` lua
if not dependency_is_pending then
  dependency_is_pending = redis.call(
    'sismember', job:pending_external_dependencies_key(), dependency_name) == 1
end
```