Save time debug information in the working directory.
Create jobs from the most incomplete dataset.
Select lumis with low attempts first when creating jobs.

This hopefully migitates xrootd jobs where a run is being throttled by the
remote site in an non-obvious way.
Rephrase some SQL statements.