[Type checker] Refactor override checking.
Break the gigantic swift::checkOverrides() into a few separable pieces
encapsulated in a new class, OverrideMatcher:
* Setup: establish whether we can do matching at all
* Matching: check whether we have a match based on a set of checking rules
* Checking: check that the selected override is semantically correct
* Search: apply various matching rules to try to find the overridden declaration
While here, limit the dependencies of override checking somewhat.
Specifically, don’t ask for the type of the declaration until we’ve found
a potential overridden declaration to check against, and even then only do
it when the “simple” checks fail.