In particular, this commit includes:
* Attempt to abstract access to FirSourceElement via FirModifier
* Add more visit functions to DeclarationCheckersDiagnosticComponent
* Add messages+factories for 4 modifier-related errors and warnings
* Introduce FirModifierChecker
First of all, note that currently ControlFlowGraphBuilder instance is fully mutable
and shared between all local classes and top-level classes in the same thread
Before this change, previous node for member of local class
was defined as lastNode
And in the case of implicit types, lastNode might be in a middle of another
local class member that is being resolved right now.
See the test:
- "a.length" expression in `bar` should be resolved because smart cast happens
before the class declaration
- "b.length" expression in `bar` should be unresolved because smart cast happens
in a different function
The latter case has been working incorrectly, the call was errorenously
resolved because "lastNode" were pointed just before "bar()" call in "foo"