Deallocates the scan structure, scan, either at the end of the code or prior to its re-initialization.
It has to be called by all procs on which the structure has been defined.
Parameters:
input:
scan- [scandef], a S2HAT structure defining the properties of the scan and which is to be
deallocated.