heterodyne: Add minimum spectra argument (MIN_SPECTRA).

Small numbers of spectra either cause certain tasks like FINDBACK or
FIXSTEPS to abort with an error, and there needs to be sufficient
spectra to define a norm for non-linearity above which anomalous
spectra can be rejected.  For now set the default to 50 spectra, and
see how it works in practice.  There is a case to make the threshold
somewhat larger.
(cherry picked from commit 9e4d4b4140b383d17214937d6afcbd4811694e3c)
heterodyne: Protect FINDBACK from too few data points.

This is in case MIN_SPECTRA is set lower than 50.

This addresses fault 20121105.004 (latest reports).
(cherry picked from commit fedea4fb23fe33079d9ee889da94825b7794c16e)
heterodyne: Add two arguments pertaining to detection of spectra with ringing.

Also added a a paragraph about ringing to the description.
(cherry picked from commit 6a3eac0269cf2a1acf19745d2afef364698e95ab)
heterodyne: Add two recipe parameters to control filtering of high-frequency ringing.

Completes the work that began with 05b5864e9a0d28c48e.
(cherry picked from commit b4236390ddb712e4cc09eabfc5acfcce7addb3c8)
spectroscopy: Merge the headers of the new frame.

Without this step, only the current integration's headers are accessed.
Since these headers do not include the instrument name, it is not
possible to find the corresponding header-translation class.  Merging
with the observation headers fixes this.
(cherry picked from commit 04cc6c6a8c3d8ac8e5959585b67800f12b74f1ab)
CGS4: Use STATS instead of HISTAT to derive the median and mode.

This is to avoid determining the statistics using a too-sparse
histogram within HISTAT.
(cherry picked from commit 8128684a697353556f44b5d1b45084459489acc0)