Recalculate the HDU checksum and if required, write the new value.
This is the equivalent of the cfitsio fits_write_chksum function.
file - opened fits file.
None