ignore leveldb extension: ldb
remove residual pthread references, but restore in build for gtest

gtest depends on pthread in Ubuntu 14.04
[pycaffe] use class names of the form Py* instead of Caffe*
[pycaffe] live in caffe namespace instead of opening it
[pycaffe] use a namespace alias instead of using directives for boost::python
[pycaffe] make PyNet a class, not a struct
[pycaffe] make PyBlob a template over Dtype

We will not actually support double nets in Python with this commit, but
this change will be necessary to create layers that embed Python.
[pycaffe] split _caffe into source and header files

This brings pycaffe more in line with usual C++ style, and will allow
the wrapper classes to be used within caffe when embedding Python.
[pycaffe] declare the _caffe module init function
[pycaffe] remove name property from PyBlob and PyLayer

Attaching names to pycaffe Blobs and Layers isn't necessary anymore,
since they are now accessed by name. This change brings PyBlob and
PyLayer closer to their C++ counterparts, and makes it easier to pass
around blobs without knowing their names, e.g., when embedding Python
in a layer.
[pycaffe] expose Blob.Reshape

While this function should never be called in the current interface, it
will be necessary to have when embedding Python.
mnist demo now works with lmdb and leveldb (set parameter in create_mnist.sh), switched around includes
data now written to backend in batches
minor changes to variable names and error messages + set default backed in convert_mnist_data.cpp to lmdb
updated lenet_train_test.prototxt + minor correction to create_mnist.sh
parse_log.sh adapted to new training log format + fixed typos and updated description
Merge pull request #1015 from mohomran/fixing_parse_log_script

fix for tools/extra/parse_log.sh
Merge pull request #1008 from mohomran/mnist_with_lmdb

convert MNIST demo to lmdb, fixes
Merge pull request #1014 from longjon/cleaner-pycaffe

Clean up pycaffe core
include comment on CPU mode fine-tuning for Flickr example