CMake - rebase + travis-ci integration

Rebased to BVLC/dev as asked by @jeffdonahue in #623. Working on CMake build to travis-ci integration.

It will contain merge conflicts due to a rebase. If this PR is considered successful it should be forced pushed onto BVLC/cmake