c++工厂模式二

cpp factory mode design with creators, code at repo

Use c++11 feature functional to generate a factory with product creators, is more flexible than previous one. See more detail in the code.
This is very similar with the realization of layer / solver from BVLC/caffe.

Notice REG_* macros should be call in .cc files, and .o should be linked to final executable file;