From what I can tell adding an inverse transition function to support AVG for numeric does not affect the number of trailing zeros in the results, so I've attached a patch which now has inverse transition functions to support numeric types in AVG and all of the STDDEV* aggregates.
here's a slightly updated patch in which I've fixed up an comment that had become out-dated because of the patch. I also changed the wording in quite a few of my comments and made some changes to the docs. The only other change was an extra error check just in case window_gettupleslot was to fail to get a tuple that should always be in the tuple store.
I'm now classing the patch is not WIP anymore. I think it's ready for the commitfest.