add MemoryDataLayer for reading input from contiguous blocks of memory
add size accessors to MemoryDataLayer

This will facilitate input size checking for pycaffe (and potentially
others).
add basic tests for MemoryDataLayer
pycaffe: let boost pass shared_ptr<CaffeNet>
pycaffe: store a shared_ptr<CaffeNet> in SGDSolver

Doing this, rather than constructing the CaffeNet wrapper every time,
will allow the wrapper to hold references that last at least as long as
SGDSolver (which will be necessary to ensure that data used by
MemoryDataLayer doesn't get freed).
pycaffe: add Net.set_input_arrays for input from numpy

This requires a net whose first layer is a MemoryDataLayer.
pycaffe: allow 1d labels to be passed to set_input_arrays
fix lint error in syncedmem.hpp