add set_cpu_data to Blob and SyncedMemory

This allows a blob to be updated without copy to use already existing
memory (and will support MemoryDataLayer).
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
Merge pull request #294 from longjon/memory-data-layer

Add a layer for in-memory data, and expose it to Python
note bug in cifar10 full with CPU computation
improve includes in util/math_function.hpp

This commit removes the redundant <math.h>, and adds the necessary
<stdint.h> and <glog/logging.h>.
Merge pull request #396 from longjon/math-includes

Improve includes in util/math_functions.hpp
make solver_mode an enum with CPU and GPU -- fully backwards compatible
with old 0/1 style
Merge pull request #403 from jeffdonahue/solver-mode-enum

Make solver_mode an enum: CPU or GPU
fix Makefile bug - HXX_SRCS was things that don't end in .hpp, instead
of things that do...
Merge pull request #406 from jeffdonahue/makefile-include-bug

Fix Makefile header dependency bug
fix merge