Extended the memorize utility to consider keyword arguments. First used in
getSmallGrading in pmc.py.
Absolute Z/2 grading.