Persistent transformations

This improvement to DataTransform allows us to have a persistent state, which allows to apply the same transformation (cropping, mirror) to multiple images. There is a `ResetState` to reset the state and compute a new transformation for the next image.

@longjon Could you take a look and let me know your opinion?