measurePSF: Allow for option to reserve PSF candidates from fitting for cross-validation

To get a unique random seed for each CCD this required adding expId method for processImage
Merge branch 'tickets/HSC-966'
Fixed cosmicRay() in RepairTask for the case background is subtracted.

When the background is subtracted with finer binsize, new exposure
will be created and cosmic rays will be detected on that exposure.
But the image of that exposure was not properly returned back.
calibrate: implement doMeasureApCorr switch

This switch was defined but not implemented.  Aperture correction
measurement should be disabled for coadds, as they already have
an aperture correction (from the sum of the inputs).
Merge branch 'tickets/HSC-996'
Change default setting for reserved PSF objects
Merge branch 'tickets/HSC-951'
processCoadd: set detection to use the declared variances

In detection on a coadd, we typically want to normalise out
the (sometimes extreme) differences in depth over the image
due to dithers.
ingest: permissions should be specified in octal

Specifying the permissions without using octal leads to
the bizarre: --w--wx--T .
ingest: silently ignore mkdir failures due to race conditions

The directory may have been created by another process.