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

This allows finetuning from Python, for example.
[pycaffe] expose Net::SharedTrainedLayersWith as Net.share_with
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
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
fix flaky test EXPECT_EQ code, using EXPECT_FLOAT_NEAR per Jeff
fix flaky math functions, remove unnecessary instantiations.
Merge pull request #1264 from Yangqing/dev

Clean flaky code
some namespace simplification
Merge pull request #1269 from Yangqing/dev

Minor change: some namespace simplification
move registration code to corresponding cpp files.
Merge pull request #1270 from Yangqing/dev

Give back to layer what is layer's, and to factory what is factory's
Revert "OpenCV should be compiled using pkg-config options." -- breaks
compilation on working systems

This reverts commit 4587b2f9043996fed36fc989c00329ec829ecae9.
some namespace cleaning.