haskell-ghc-mod-5.0.1: use wrapProgram

Use wrapProgram from makeWrapper to wrap ghc-mod and ghc-modi like
haddock. The wrapper code is clearer and hopefully more maintainable. As
a side-effect, the bug where emacs would hang while loading ghc-modi is
fixed.
Merge pull request #3743 from ttuegel/ghc-mod

Fix ghc-modi hanging in emacs