SCUBA2: check QA results exist before de-referencing

If called multiple times, it is worth checking that the chosen element
in the QA info is defined before attempting to de-reference it as
subarrays occasionally drop out during an observation.
SCUBA2: new primitive to control noise calculation for science data

This primitive can be used to control the files being operated on when
determining the noise properties. Options exist to process the first
30-seconds only (default), each 30-second file in turn or use the full
time stream for the observation.
SCUBA2: factor out file grouping to new primitive

A new primitive has been added which determines which files to process
so the current code for that is not necessary.
SCUBA2: use new primitive for processing data as noise