State: make use of the new MISSING state

The state machine should now separate QUEUED jobs into those
for which we already have the data (new state: WAITING) and
those for which we don't (new state: MISSING).  This is
so that it does not attempt to check for the presence of
data for the same job multiple times if re-run.  The
fetching processes now look for jobs in the MISSING state
rather than QUEUED.