MNIST demo with lmdb (addresses issues 922 and 958)

The MNIST demo now supports both lmdb (default) and leveldb. The choice of backend can be set in create_mnist.sh as a command line parameter for convert_mnist_data.bin. 

Writing examples individually to the lmdb backend is literally 100x slower than using batches, so now convert_mnist_data.cpp resembles convert_imageset.cpp a lot more closely in that batch writes are used for leveldb and lmdb.

./examples/mnist/train_lenet_consolidated.sh runs to completion. The final accuracy is 99.79% and 99.2% on the training and test sets respectively.

Commit 750f92e among other things removes a bug that is currently in the tip of the dev branch.
- examples/mnist/create_mnist.sh, l.10-11: missing path to db folders ($EXAMPLE) in rm -rf command