haskell-cabal.eclass: check if ghc actually enables 'Dynamic by default'

As exbb2 found out in Issue #216 (https://github.com/gentoo-haskell/gentoo-haskell/issues/216)
ghc-HEAD switched bask to static by default:
    https://github.com/ghc/ghc/commit/951e28c0625ece7e0db6ac9d4a1e61e2737b10de

Added some helpers to detect such ghc and made use of them.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
dev-lang/ghc: add a USE=shared to live ebuild

Switches ghc to build shared libraries by default
for experimental purposes.

Addresses Issue #216 (https://github.com/gentoo-haskell/gentoo-haskell/issues/216)

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>