Numeric Aggregates Performance Improvement

https://commitfest.postgresql.org/action/patch_view?id=1176
http://archives.postgresql.org/message-id/CAFj8pRDQhG7Pqmf8XqXY0PnHfakkPQLPHnoRLJ_=EKFSbOAWeA@mail.gmail.com