Fixes how instances methods are not deregistered

It appears that instance methods do not get removed
due to not passing the 'is' check, so switch to using
a new reflection utility method which can handle this
equality check in a way that actually works.

Also adds tests to make sure this does not occur again.

Closes-Bug: 1257550

Change-Id: Iab47dd62cb61de0d93d0fe8d90e59772beebeaeb
Merge "Fixes how instances methods are not deregistered"