Separate ImageDimensionReducer from DimensionReducer

Created a class DimensionReducer that contains most of the base
functionality from ImageDimensionReducer. ImageDimensionReducer
now inherits DimensionReducer. Changed parameter model to reducer.