Fix unsafe weak reference usage in test 141

There were patterns like:
WeakRef<Class> klass = ...
klass.get().<method>

These are unsafe since background GC could unload and null out the
weak reference. We now pass the weak reference to another function.

Deleted bad and unsafe test.

Test: test-art-host

Bug: 29889416

Change-Id: I6a8daf678262757e54e5817ec63b7c33f4b156ab
2 files changed