Make sum and product INLINABLE
Make sum and product INLINABLE

This was causing the bad behaviour in Trac #7507,
because 'sum' wasn't getting specialised to Int64.

It also deals with Trac #4321, which had the same cause.

This has a big effect on some nofib programs too:

--------------------------------------------------------------------------------
        Program           Allocs   Runtime   Elapsed  TotalMem
------------------------------------------------------------------------
     bernouilli            -2.6%     -2.0%     -2.0%     +0.0%
           fft2           -23.8%      0.09      0.09    -16.7%
          fluid            -4.4%      0.01      0.01     +0.0%
         hidden            -3.2%     +2.1%     +1.8%     +0.0%
      integrate           -38.0%    -47.7%    -47.7%     -1.0%
           x2n1           -30.2%      0.01      0.01    -50.0%
------------------------------------------------------------------------
            Min           -38.0%    -47.7%    -47.7%    -50.0%
            Max            +0.4%    +11.2%    +11.8%     +6.9%
 Geometric Mean            -1.3%     +0.2%     +0.2%     -0.8%

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