allow to (optionally) register a callback to use when releasing output data chunks

to be used instead of free() when the iomux is responsible of release the output chunks