Re-engineer exprIsConApp_maybe (fixes Trac #5327)
Re-engineer exprIsConApp_maybe (fixes Trac #5327)

The problem with #5327 was like this:
    let x = I# 0 `cast` co1
    in ...(case x `cast` co2 of I# y -> blah)...

The two casts cancelled out, but exprIsConApp_maybe couldn't see
that.  This patch makes it simpler, faster, and more effective.

(Incidentally, usually 'x' would be inlined, in #5327 it wasn't
because of an INLINEABLE pragma and the lone-variable thing.
Instead of fiddling with alrady-delicate code, I just made
exprIsConApp_maybe better.)

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