Produce the layers using the abstract factory pattern for simplicity

"[For me, the lesson learned when writing Caffe as a grad student is simplicity: reduce my problem to one already solved.](https://github.com/Yangqing/caffe/wiki/Convolution-in-Caffe:-a-memo)" -- Yangqing

The factory pattern is on the todo list since the public release of Caffe. As more and more implementations are added, it is time to refactor how the layers are created. 

The theory is not repeated here as there are already [plenty](http://sourcemaking.com/design_patterns/abstract_factory) of [articles](http://www.dofactory.com/net/abstract-factory-design-pattern) talking about the [abstract factory pattern](http://www.oodesign.com/abstract-factory-pattern.html).
I'm not sure the most suitable general way to [manage the different implementations of the same layer](https://github.com/BVLC/caffe/issues/1108#issuecomment-56274226). The problem is related to #1108.