Fix travis

Some of the components of the fix include:

- including the <memory> header
- enabling c++0x mode
- installing and using g++-4.8
- not installing any optional dependencies except lapack
- fixing the cpd-test call

When I installed all optional dependencies, I got a "illegal
instruction" error during the tests.