Optionally build examples through Cabal

These commits add a flag to the Cabal build which enables building the examples as part of the build process, and fix some unnecessary imports in these examples.

The *make travis* target is altered to include examples building.

This is based on #10.