Numeric Aggregates Performance Improvement

https://commitfest.postgresql.org/action/patch_view?id=1176
http://archives.postgresql.org/message-id/CAFj8pRDMCsY+fa99xmw1mzhzUjj=i2AgyN9KerS=ZSYnZVpDHA@mail.gmail.com