add cabal testsuite

I added a cabal test suite so everybody should be able to run the tests with `cabal test`.

@Tblue Please merge this into master after review. Thanks!