Further simplify the data layers and extend the MemoryDataLayer

Completely remove the duplicate codes of the data layers.

@geenux, @shelhamer, @jeffdonahue
Oh, I only meant that physically in the code layout the `DataLayerSetup()` should be defined higher up, above `InternalThreadEntry()`, since in other layers `LayerSetup()` is defined first e.g. in ConvolutionLayer.