fix leak in #instance_methods and #singleton_methods
Merge branch 'p385/instance-methods-leak' into github-p385