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
Use Thrust to manage the underlying memory of SyncedMem
Implement and test SyncedMem::resize and reserve
Add Blob::capacity and make Blob::Reshape capacity aware
Merge the Blob constructors and initialize all the fields properly
Change the Makefile to be consistent in style
Use static_cast instead of reinterpret_cast to cast void pointers
minor cast/style fixes

make some casts static_casts

minor style fixes
minor makefile style/dependency fixes; move more general rule after more
specific ones (for older versions of make that take first match)
use handwritten resize methods instead of thrust host/device vectors
-- couldn't get the thrust version working at all
make TestResize less trivial given new syncedmem resize design
add net constructor that takes pointer to other net with which we will
share data blobs with matching names
increase imagenet val batch size to 250 since little additional memory is
used
misc minor cleanup
check that malloc/realloc succeed
add comments explaining memory_share_net