Add memoized_method function

Memoization: now for methods too!