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

gtest depends on pthread in Ubuntu 14.04
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
Solver switching support & implementation of Nesterov's accelerated gradient and AdaGrad
restored vituals in solver.hpp
converted pointers to shared_ptr
fixed solver constructor in train_net.cpp
improved numerical stability for AdaGrad
bugfixes for AdaGrad
Added L1 regularization support for the weights
fixed caffe.proto after a mistaken rebase
Addressed Yangqing's comments
fixes after rebase
proto conflit, lint, and math_functions (compiler complaint)