Modified iteration loop in lightcurves.c to be less wasteful.
* Compute first-pass differential photometry against "refmag" during
  file input in read_cat.  Used to init a systematic_fit structure.
* Refactor of iteration loop to compute all segment offsets at the
  same time.  They are removed prior to systematic fit if requested.
* Only read in stars needed for segment offsets (i.e. comp stars for
  all but the last iteration) and only write out results at the end.
* Require "compok" for computing median meridian flip offset.
Efficiency improvement: compute segment offsets only when there are any.
Fixed accidental use of pt rather than star in systematic_apply_star.