Refactor to avoid duplicated code in moments proxy functions.

Refs #7891
Python 2.6 doesn't have the delta argument for some asserts.

Replace here with more long winded comparison that does the same thing
by hand.
Refs #7891