Do not accept functions in enum patterns past resolve
Overhaul typechecking of patterns

Instead of checking patterns in a top-down fashion with a known
expected type on entry, this changes makes typeck establish
appropriate constraints between a pattern and the expression
it destructures, and lets inference compute the final types
or produce good error messages if it's impossible.
Update tests with the new error messages
auto merge of #18171 : jakub-/rust/match-typeck, r=pcwalton

Rather than doing it top-down, with a known expected type, we will now simply establish the appropriate constraints between the pattern and the expression it destructures.

Closes #8783.
Closes #10200.