Stop capture threads also on deconfigure without prior capture stop in fits interface and hdf5 writer