Prevent crashing when `match` arms use name of existing callable (#18449)
Fixes #16793. Fixes crash in #13666.
Previously mypy considered that variables in match/case patterns must be
Var's, causing a hard crash when a name of captured pattern clashes with
a name of some existing function. This PR removes such assumption about
Var and allows other nodes.