Fixes for problems uncovered during the DBS2/DBS3 consistency check:
  - Block size and file count is now correct.
  - Physics group is not correct.

This also adds a legitimate unit test which validates all data injected
and tests the special T0 DBS2/DBS3 upload only mode.
Bugfix Smart error handler

Bugfix for extreme cases of null reports and also
a few cases where jobs could get stuck in jobfailed.
Merge pull request #4406 from sfoulkes/dbs3_unittest

Fixes for problems uncovered during the DBS2/DBS3 consistency check:
Merge pull request #4407 from dballesteros7/fixErrorHandlerSmart

Bugfix Smart error handler