Travis CI rebased

Hi, I've taken PR #667 (thanks @huyng!) and rebased it onto some commits cutting down on the duplication between CPU and GPU tests to make it easier and more reliable to run only the CPU tests, and cut down on duplicated code throughout the test suite.  I added a `make runtestnogpu` target to run only the tests that do not use the GPU (had to append `CPUGPU` to some tests that use both CPU and GPU and can't be separated).

I made a few changes to the `.travis.yml` in d95aea8 for CPU-only testing and notification by email only going to the committer. Others can see build status on the PR or travis feed.