Memoize variables

This means variables are only computed one time. However, the memoization is
only cleared when the variable is redefined, *not* when it's dependencies are
redefined.

So more work is required.  Perhaps clearing *all* memoized values when the environment changes is sufficient.

/cc @joshprice