Add engine switch to pick computational backend

At the moment Caffe has a single implementation for computations like convolution, pooling, and so on but different backends for different purposes or conditions should be possible. The `engine` param defines a switch for a layer to select among different computation engines.

A new engine to take advantage of this switching will follow when ready.

p.s. the CUDA code in common is shifted to the CUDA includes in device_alternate for housekeeping too.