Re-do the "function application discount" (fixes Trac #6048)
Re-do the "function application discount" (fixes Trac #6048)

* Undoes Max's very aggressive function-inlining change
  (see comments with Trac #6048)

* Resticts function application discount to functions
  that occur just once in the body. It was the multiple
  occurrences that led to the exponential behavour in
  Trac #6048.

See Note [Function application discount] in CoreUnfold.

Module binary sizes are down 2% on average, which is good.
Allocations wobble about a bit, but only on a few benchmarks
and not by much, so it seems a price worth paying to avoid
exponential behaviour!

                         Allocs
            Min           -1.2%
            Max           +2.8%
 Geometric Mean           +0.0%

green-haskell/ghc,tibbe/ghc,vikraman/ghc,ezyang/ghc,nushio3/ghc,snoyberg/ghc,acowley/ghc,mfine/ghc,sgillespie/ghc,vTurbine/ghc,elieux/ghc,nushio3/ghc,tjakway/ghcjvm,ghc-android/ghc,mcschroeder/ghc,GaloisInc/halvm-ghc,fmthoma/ghc,tjakway/ghcjvm,lukexi/ghc-7.8-arm64,nushio3/ghc,elieux/ghc,tjakway/ghcjvm,TomMD/ghc,hferreiro/replay,ekmett/ghc,fmthoma/ghc,ghc-android/ghc,ezyang/ghc,ml9951/ghc,sdiehl/ghc,siddhanathan/ghc,nomeata/ghc,forked-upstream-packages-for-ghcjs/ghc,vikraman/ghc,acowley/ghc,tibbe/ghc,AlexanderPankiv/ghc,anton-dessiatov/ghc,mfine/ghc,TomMD/ghc,lukexi/ghc,hferreiro/replay,siddhanathan/ghc,oldmanmike/ghc,ghc-android/ghc,tjakway/ghcjvm,christiaanb/ghc,snoyberg/ghc,holzensp/ghc,mfine/ghc,vikraman/ghc,ghc-android/ghc,vTurbine/ghc,lukexi/ghc,green-haskell/ghc,da-x/ghc,anton-dessiatov/ghc,frantisekfarka/ghc-dsi,sgillespie/ghc,gridaphobe/ghc,sdiehl/ghc,holzensp/ghc,ryantm/ghc,AlexanderPankiv/ghc,bitemyapp/ghc,lukexi/ghc,urbanslug/ghc,vTurbine/ghc,spacekitteh/smcghc,fmthoma/ghc,frantisekfarka/ghc-dsi,TomMD/ghc,urbanslug/ghc,mfine/ghc,da-x/ghc,fmthoma/ghc,da-x/ghc,christiaanb/ghc,urbanslug/ghc,forked-upstream-packages-for-ghcjs/ghc,frantisekfarka/ghc-dsi,sdiehl/ghc,anton-dessiatov/ghc,spacekitteh/smcghc,nushio3/ghc,oldmanmike/ghc,olsner/ghc,vikraman/ghc,mfine/ghc,ghc-android/ghc,TomMD/ghc,snoyberg/ghc,vTurbine/ghc,nathyong/microghc-ghc,oldmanmike/ghc,mettekou/ghc,wxwxwwxxx/ghc,elieux/ghc,urbanslug/ghc,ekmett/ghc,nkaretnikov/ghc,christiaanb/ghc,ghc-android/ghc,lukexi/ghc,siddhanathan/ghc,lukexi/ghc,sgillespie/ghc,anton-dessiatov/ghc,elieux/ghc,AlexanderPankiv/ghc,olsner/ghc,nkaretnikov/ghc,ekmett/ghc,jstolarek/ghc,tjakway/ghcjvm,da-x/ghc,ml9951/ghc,mcschroeder/ghc,olsner/ghc,mettekou/ghc,acowley/ghc,ml9951/ghc,fmthoma/ghc,shlevy/ghc,oldmanmike/ghc,jstolarek/ghc,frantisekfarka/ghc-dsi,shlevy/ghc,olsner/ghc,shlevy/ghc,vikraman/ghc,AlexanderPankiv/ghc,wxwxwwxxx/ghc,holzensp/ghc,spacekitteh/smcghc,nomeata/ghc,urbanslug/ghc,forked-upstream-packages-for-ghcjs/ghc,AlexanderPankiv/ghc,mcschroeder/ghc,GaloisInc/halvm-ghc,christiaanb/ghc,mettekou/ghc,ezyang/ghc,ezyang/ghc,gridaphobe/ghc,christiaanb/ghc,jstolarek/ghc,ezyang/ghc,gcampax/ghc,acowley/ghc,snoyberg/ghc,vikraman/ghc,green-haskell/ghc,mfine/ghc,lukexi/ghc-7.8-arm64,siddhanathan/ghc,ml9951/ghc,sgillespie/ghc,ekmett/ghc,siddhanathan/ghc,vTurbine/ghc,spacekitteh/smcghc,mcschroeder/ghc,fmthoma/ghc,gcampax/ghc,ryantm/ghc,sgillespie/ghc,sgillespie/ghc,tjakway/ghcjvm,lukexi/ghc-7.8-arm64,ekmett/ghc,shlevy/ghc,oldmanmike/ghc,anton-dessiatov/ghc,nushio3/ghc,gcampax/ghc,nathyong/microghc-ghc,nomeata/ghc,forked-upstream-packages-for-ghcjs/ghc,shlevy/ghc,green-haskell/ghc,elieux/ghc,wxwxwwxxx/ghc,spacekitteh/smcghc,hferreiro/replay,da-x/ghc,snoyberg/ghc,gcampax/ghc,bitemyapp/ghc,snoyberg/ghc,sdiehl/ghc,urbanslug/ghc,tibbe/ghc,hferreiro/replay,wxwxwwxxx/ghc,olsner/ghc,ml9951/ghc,mcschroeder/ghc,shlevy/ghc,AlexanderPankiv/ghc,wxwxwwxxx/ghc,GaloisInc/halvm-ghc,nomeata/ghc,olsner/ghc,nkaretnikov/ghc,fmthoma/ghc,nathyong/microghc-ghc,gridaphobe/ghc,GaloisInc/halvm-ghc,green-haskell/ghc,ml9951/ghc,nkaretnikov/ghc,nkaretnikov/ghc,urbanslug/ghc,acowley/ghc,jstolarek/ghc,tibbe/ghc,bitemyapp/ghc,ml9951/ghc,nushio3/ghc,mettekou/ghc,anton-dessiatov/ghc,wxwxwwxxx/ghc,lukexi/ghc-7.8-arm64,ryantm/ghc,jstolarek/ghc,holzensp/ghc,ezyang/ghc,mettekou/ghc,frantisekfarka/ghc-dsi,da-x/ghc,holzensp/ghc,nathyong/microghc-ghc,bitemyapp/ghc,oldmanmike/ghc,nathyong/microghc-ghc,ryantm/ghc,nathyong/microghc-ghc,snoyberg/ghc,sgillespie/ghc,gcampax/ghc,lukexi/ghc-7.8-arm64,gridaphobe/ghc,elieux/ghc,TomMD/ghc,ghc-android/ghc,sdiehl/ghc,nushio3/ghc,nathyong/microghc-ghc,hferreiro/replay,elieux/ghc,tjakway/ghcjvm,hferreiro/replay,gridaphobe/ghc,acowley/ghc,sdiehl/ghc,mfine/ghc,christiaanb/ghc,mcschroeder/ghc,forked-upstream-packages-for-ghcjs/ghc,gridaphobe/ghc,oldmanmike/ghc,tibbe/ghc,AlexanderPankiv/ghc,acowley/ghc,nkaretnikov/ghc,sdiehl/ghc,gcampax/ghc,ezyang/ghc,TomMD/ghc,olsner/ghc,da-x/ghc,forked-upstream-packages-for-ghcjs/ghc,nkaretnikov/ghc,wxwxwwxxx/ghc,mettekou/ghc,bitemyapp/ghc,vTurbine/ghc,siddhanathan/ghc,christiaanb/ghc,anton-dessiatov/ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,mcschroeder/ghc,ml9951/ghc,vTurbine/ghc,siddhanathan/ghc,gridaphobe/ghc,nomeata/ghc,vikraman/ghc,shlevy/ghc,mettekou/ghc,forked-upstream-packages-for-ghcjs/ghc,hferreiro/replay,ryantm/ghc,GaloisInc/halvm-ghc,gcampax/ghc,TomMD/ghc