Refactor StatementContextBase.effective access
In order to correctly synchronize substatement and stage completion
view, we need all accesses from StatementContextBase towards its
.effective field guarded.
This patch audits all callers and instantiates an
ensureEffectiveSubstatements() guard around all accesses.
We also introduce effectiveChildrenToComplete(), which communicates
the effective children which should be processed.
InferredStatementContext returns as empty list from this method
if it is not materialized. This acts as an explicit guard, which
is extensible with local state later.
JIRA: YANGTOOLS-784
Change-Id: I235bc15d315ddee71c20f3875412d8d05803a716
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>