Provide a Cabal file for dependencies

Fixes issue #988.

This introduces a cabal file explicitly listing and enforcing our Haskell dependency ranges.

It also provides MIN_VERSION_* macros for all dependencies that replace existing manual macros like `PARALLEL3`, making it easier to be backwards compatible without having to manually add such switches.