Fail or postpone processing test steps when insufficient information is currently available.
Fail or postpone processing test steps when insufficient information is currently available.

Summary:
+ If a test marked as 'Expecting test results' finishes too quickly without
  producing output files, we currently pass the test due to lack of phase
  information. (phase.date_started is incorrectly set to None because of a race
  condition between sync_job_step and sync_phase).
  + date_started of a phase is set to the earliest date_started of all its steps
    (done periodically in sync_phase).
  + If the first step in a phase starts and completes very quickly, sync_phase
    has not gotten a chance to get called to update phase.date_started, leaving
    it at the default value of None.
  + When the test step completes, it tries to check if the step is part of the
    last phase in its test job (done by comparing date_started of its parent
    phase).
  + If this field is missing, we currently pass the test.
+ Instead, retry processing the step at a later point when phase info will be
  available.

Test Plan: Manually verified tests with and without output.

Reviewers: josiah, kylec

Reviewed By: kylec

Subscribers: mkedia, wwu, changesbot, vishal

Maniphest Tasks: T37704

Differential Revision: https://tails.corp.dropbox.com/D102435

wfxiang08/changes,dropbox/changes,bowlofstew/changes,dropbox/changes,wfxiang08/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,bowlofstew/changes,dropbox/changes,wfxiang08/changes