Backport Add case IsInstanceOf(inner, _) in inlineable methods.

This mostly gets rid of the canEqual() methods that are part of
the equals() methods generated for case classes.

(cherry picked from commit 8c77c36d76e65137114f57eece9fd565ca2e4724)