cupid: Write history to output JSA catalogue

The history written to the JSA catalogue is just a copy of the history in
the main output NDF created by findclumps (i.e. the mask).
cvg: Change API for cvg_fc2hd to allow header contents to be retained
cvg: Add some C wrappers
cvg: Use cfitsio C pointers instead of integers in C-land

All C-wrappers now export and import fitsfile structure pointers instead
of F77 integer unit numbers.