[pycaffe] expose Net::CopyTrainedLayersFrom as Net.copy_from

This allows finetuning from Python, for example.
[pycaffe] expose Net::SharedTrainedLayersWith as Net.share_with
use glog to provide a backtrace on crash
[cmake] move dependency finding to root CMakeLists.txt

In this way, custom include directories for the dependencies are
also available for tools/ and the bindings.  This is necessary for
example when someone is using custom built dependencies which are
not installed in the system's default directories (e.g. OpenCV includes
are required in tools/ through io.hpp)
Merge pull request #1232 from baeuml/cmake-move-dependency-discovery

[cmake] move dependency discovery to root CMakeLists.txt
Merge pull request #1227 from longjon/crash-backtrace

Use glog to provide a backtrace on crash
Fix CMake build of pycaffe
- generate right shared library name
- fix CMake linking with the new layer factory
- find numpy

Fix finding protobuf.
Merge pull request #1206 from BlGene/dev

Fix python plugin to work with new layer factory in CMake build
Merge pull request #1195 from longjon/python-copy-from

Expose Net.copy_from and Net.share_with in pycaffe
fix instantiation
adding missing libraries - lm and lstdc++
Merge pull request #1258 from Yangqing/instantiation

fix instantiation per C++ standard
Refactored leveldb and lmdb code.
Some tool updates that I forgot.
Some cleanup to make travis happy.
Updated interface to make fewer string copies.
Don't autocommit on close for the databases.  If they were read-only, then they might fail.
data layer test was relying on the autocommit on close db behavior that was recently removed.
Updated cifar10 build script to specify db backend.
Switched create_cifar10.sh output from leveldb to lmdb.