convert impl/MemoKey

This was slightly tricky to figure out: This class's hash compares
values by reference equality. Implemented that in python by using the
regular namedtuple hash but storing the value's id rather than the value.

I'm not sure whether there's some detail about Path equivalency that
we'll have to worry about.