Intern statements along copy axis
When we are inferring statements through grouping/uses, we end up adding
a few bits to record the copy history and effective status/config. This
process does not feed back anything back to the original declaration
site.
This leads to a situation when we can have a number of inferred
statements which are exactly equal, yet each is its own java object --
hence unnecessarily using heap for duplicate objects.
We can improve this by having a deduplication map at the site of
original declaration and updating/consulting it when we find we have an
otherwise-unmodified statement.
This patch adds the prerequisite constructs to yang-parser-spi and
the smarts to perform this deduplication to yang-parser-reactor.
JIRA: YANGTOOLS-1214
Change-Id: I957c6d69d16717759f22a78163c705390e602e22
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>