Add support for reusable streaming
With the actual implementations working on top of
NormalizedNodeStreamWriter, we gained the ability to flexibly
receive stream events.
This patch takes advantage of that flexibility by allowing
a ReusableImmutableNormalizedNodeStreamWriter to be the receiver
of the events -- thus allowing parts of the state involved in
building a NormalizedNode tree to be reused -- lowering GC
pressure.
A number of call sites, which can safely reuse such state are
converted to use the newly-introduced facility.
Change-Id: Iaf1b3ab2b2996e7004c036fc93a80a8ca8792314
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>