Implement 'cabal sandbox hc-pkg'.

See #1200 (for which this is a partial fix).
Merge pull request #1273 from 23Skidoo/sandbox-hc-pkg

Implement 'cabal sandbox hc-pkg'.
Mention the platform in the sandbox package DB directory name.

Old: '.cabal-sandbox/ghc-7.4.2-packages.conf.d'
New: '.cabal-sandbox/i386-linux-ghc-7.4.2-packages.conf.d'