Refactor DataLayer using a new DataTransformer

Start the refactoring of the datalayers to avoid data transformation
code duplication. So far, only DataLayer has been done.
Refactor ImageDataLayer to use DataTransformer
Merge pull request #954 from geenux/dev-redundant-data

Refactor data layers to avoid duplication of data transformation code