Add LithiumSR1 input/output support
This is a code drop of both DataInput and DataOutput for Sodium SR1
streaming format. It uses its own dedicated tokes, along with quite
a few of stateful encoding rules.
Where Lithium did encoding did not perform any look-behind except
for LeafSetEntryNodes and only maintained simple coding tables,
this coder maintains simple 'parent' state tracking.
While the state tracking is not mandated on the encoder side, some
amount of tracking is required in the decoder side to provide full
coverage of coding constructs.
Two examples of this are:
- parent QName references, which are expanded to cover not only
LeafSet/LeafSetEntry, but also UnkeyedList/UnkeyedListEntry
and most importantly Map/MapEntry pairs
- Map/MapEntry tracking is also important for coding leaf nodes
which represent keys -- in those cases emitting the leaf value
is superfluous, as it can be looked up from MapEntry's predicates
Also this state tracking is maintained on-stack, thus making issues
related with it nigh impossible (unlike the Lithium LeafSetEntry
bugs).
JIRA: CONTROLLER-1919
Change-Id: I5fcf85a76750301cd3f8bcbd505baa0f95397cb5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>