Simplify DataTransform

This PR tries to unify the code for the different types of data (Datum, cv::Mat, Blob) to be transformed.

It adds the option to process vectors of data, persistency and state to the Transformer. Persistency as proposed in #1311 allows to apply the same transformation to different data. #1311 has been integrated here.

@longjon could you take a look? I cannot compile it due to some template error.