Start working on version resolution

This works by:
- Querying the existing package indexes. Currently, due to
  `cabal-install` not being exported as a library, it only queries the
  installed packages.
- Trying to find the best version in the matching packages. Currently,
  I'm only choosing the biggest version available, but multiple
  resolution strategies - including which version works, could be used.
- Converting a version into a safe version range. Currently, I'm using
  the `withinVersion` helper, which converts a version into a wildcard.
  However, the final implementation should make use of haskell's
  versioning policy to assume that any non-major version change (i.e.
  anything done after the first two version digits) won't be breaking.

This is still all being worked on, but I'm happy I've moved forward.