Do not access GroupingNamespace during effective build
There are two places which are accessing GroupingNamespace during
statement build:
AbstractGroupingStatementSupport.buildDeclared() performs a check
for namespace conflict. This is better done through an inference
action in FULL_DECLARATION of root model, when we can check whether
there is a conflict -- before we ever get to build statements.
UsesStatementSupport is searching namespaces to locate its source
to build its effective model -- to satisfy
UsesNode.getSourceGrouping(). This is better done by remembering
the source grouping's context in a statement-local namespace
and then pick it up when needed.
The two changes together allow us to sweep GroupingNamespace at
the end of RootStatementContext's build.
JIRA: YANGTOOLS-1197
Change-Id: I3a75ad92aeffeeed279466fffcf4402b17ee1d09
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>