[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
SliceLayer: fix whitespace
correct naming in comment and message about average_loss
[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
Added Multistep, Poly and Sigmoid learning rate decay policies

Conflicts:
	include/caffe/solver.hpp
	src/caffe/proto/caffe.proto
	src/caffe/solver.cpp
adding missing libraries - lm and lstdc++
Merge pull request #1258 from Yangqing/instantiation

fix instantiation per C++ standard
Minor fixes.  (1) cudnn.hpp uses CHECK_EQ internally, so it needs to include glog at some point.  Including caffe/common.hpp.  (2) I often misconfigure some layer and softmax breaks when the dimensionality is too small for the input layers.  Check and fail fast.  (3) CV_LOAD_IMAGE_COLOR is deprecated and has been removed in OpenCV 3.0.  Replaced with cv::IMREAD_COLOR.
OpenCV should be compiled using pkg-config options.
Added version dependent test for IMREAD_COLOR.
Fixed CMakeList to work with OpenCV 3.
Merge pull request #1261 from kmatzen/minor_changes

[fix] build with OpenCV 3 and other minor fixes