Fix CMake build of pycaffe
- generate right shared library name
- fix CMake linking with the new layer factory
- find numpy

Fix finding protobuf.