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
find vecLib under OSX
resolve gtest conflict with clang
move library finding to top.
So that include files could be find when building tools.
temp fix for STATIC_NAME not defined in CMake
fix end-of-file newline