Groovy: optimize declaration processing
(cherry picked from commit 5e7f2b7)
IDEA-123116 method processed from static imports has special priority
(cherry picked from commit d386f9e)
known recursion manager prototype
(cherry picked from commit 458ffce)