Memoize variables when they are evaluated.

Memoization for *all* variables is cleared when *any* variable is redefined.
Merge pull request #2 from freshtonic/feature/memoize

Memoize variables