adopt XDG basedir spec

(Imported from Trac #688, reported by guest on 2010-05-12)

I want to be able to tell cabal to read the configuration from a different place than $HOME/.cabal/config.

The ultimate goal is to get rid of the non-standard .cabal directory altogether, so far careful --package-db/--prefix etc. juggling served me well; config is the last remaining file there.

> cabal --version
cabal-install version 0.8.2
using version 1.8.0.2 of the Cabal library