SCUBA2: issue errors if noise and/or flatfield results are absent

With these changes, a SETUP will only be deemed successful if the
fastflat *and* noise calculations succeeded (previously the check on
valid fastflats was not presetn). If either of these criteria is not
met the pipeline will print an error and write a dummy flag file,
forcing the SETUP to be repeated.
SCUBA2: new primitive to write SETUP files

This new primitive writes the SETUP flag file and the list of bad
bolometers. In addition it performs a sanity check on the returned
fastflats to make sure that they are from the current (setup)
observation.
SCUBA2: use new primitive to write out the flag file

Use _WRITE_SETUP_RESULTS_ for writing flag file and perform sanity checks.
SCUBA2: return list of observation numbers in primitive hash