ccdpack: Fix some pointer comparisons

It seems that on my Mac (at least):

    if ( ++c >= retbuf + BUFLENG ) {

comes out true even when `c` and `retbuf` differ by 1 with `c`
less than `retbuf`. It looks like this is some issues with
64-bit unsigned types and signed ints. Recasting it explicitly
to use a ptrdiff_t type fixes the problem:

    c++;
    if ( (ptrdiff_t)(c - retbuf) >= BUFLENG ) {

Before this fix pairndf was failing even before it started with
a buffer overflow in the Tcl communication system.

After this patch pairndf at least throws up a couple of images
although I'm not sure what I'm supposed to do with them once
they are up.
smurf: Update list of CSO fits for August.

I updated the list of CSO fits for the period 20140801-20140827 and
20140829.
smurf: Update list of nights WVM is usable.

smf_is_wvm_usable has been updated to include the night of 20140829,
where the WVM was once again showing periods of spikiness.
kaplibs: Correct error messages from kpg1Config

Fixes starlink issue #38
ast: Make astLinearApprox more robust

Previously, a pair of LutMap describing a list of points on a raster
pattern could be deemed (incorrectly) to be linear by astLinearApprox.
This was because the test points used by astLinearApprox were on a
regular grid which just happened to hit the LutMaps in just the
correct positions to make the LutMaps appear linear.

The fix is to offset the tests points slightly from a regular grid.
ccdpack: stop underruns when cleaning strings

this issue may be the cause of random crashes on the JAC computers..., not clear why as it is just a read issue
gaia: Do not assume .sdf file extension in C and Fortran code

DAT_PAR/dat_par.h defines the .sdf extension.

Note that this does not fix the TCL code.
hds: Fix datRef for file extensions != ".sdf"

DAT__SZFLX was not being used everywhere it should have been.
This was only noticeable if something other than ".sdf" is being
used as the file extension.
smurf: Fix bugs using com.freeze_flags with skyloop
kappa: wcsattrib should use REMAP when clearing as well as when setting

since clearing usually changes the value of the attribute.