Fix issue with generated matchesSafely method.

The call to super in MatchesSafely does not type-check for extensible
matchers when the method is overridden in the main class. This change moves
the method into the nested class.