Test case for memory leak in 0.620.

Run the attached perl script and with `top` monitor the process:
* With 0.615 memory usage doesn't change and remains always in very
small numbers
* With 0.620 memory usage explodes to several hundreds of Ms and soon
reaches Gs
Turn the script into a reduced test.
Fix memory leak introduced in 0.620.

- Ensure '$self' is never referenced within subs that are stored
   in $self, to avoid circular references.