Fixed python plugin to work with new layer factory.

Honestly I still don't like this idea... compiling layer_factory.cpp twice (once in libcaffe and once in pycaffe) does not sound right to me, and since the Makefile version is right, I feel that there is something not done right in CMake to link libcaffe. But honestly, I don't know what the right solution is.