Removed monkeypatching of __del__ in tests

On PyPy adding __del__ to a class after it's constructed does not
work, instead implement the leakchecker in tests by using weakrefs,
which works everywhere.

Change-Id: I873efb3e2f85f731d5836bf9bf06a21e939e8542