Lock the mex file to avoid Matlab crashes.

Commands like "clear all" and "clear function" causes segmentation faults or errors like these (especially after an 'init'):
 libprotobuf ERROR google/protobuf/descriptor_database.cc:57] File already exists in database: caffe/proto/caffe.proto
 libprotobuf FATAL google/protobuf/descriptor.cc:862] CHECK failed: generated_database_->Add(encoded_file_descriptor, size):
 [libprotobuf ERROR google/protobuf/message.cc:333] Type appears to be in generated pool but wasn't registered: caffe.LayerParameter
 Attempt to restart MATLAB?
To avoid these, lock the the mex file.
use LMDB in mnist autoencoder examples
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)
added unit test for solvers and fixed solver bugs
cleanup caffe.proto
Merge Test{SGD,AdaGrad,Nesterov}Solver; they become subclasses of
TestGradientBasedSolver
Added sanity check for AdaGradSolver; added MNIST examples for solvers
lint
Re-added solver switch into the new caffe main excutable; fixed AdaGrad MNIST example
lint