Device Abstraction

CPU / GPU device separation and abstraction

1. simplify the code
2. make a CPU-only build possible with less mess -- compare #561 
3. prepare layers and blobs for multi-device parallelism
4. pave the way for different GPU backends such as OpenCL

and so improves Caffe all around. That is, provided there is little to no overhead in both performance and coding. Since this requires a non-trivial set of coordinated changes, it has been promoted to the BVLC:device-abstraction feature branch. To contribute to this development, PR to BVLC:device-abstraction. When you rebase your feature branch on dev, comment with your fork to notify the maintainers to update.

This PR tracks the progress and integration of this branch for its final merge to dev.