Further simplify the data layers and extend the MemoryDataLayer

Completely remove the duplicate codes of the data layers.

@geenux, @shelhamer, @jeffdonahue