JSONNormalizedNodeStreamWriter: unify constructors

We have needlessly duplicated constructors -- unify them.

Change-Id: Ib87cc0eccb8f92a9d3caaf1540e90b8d4a8b9c03
Signed-off-by: Robert Varga <rovarga@cisco.com>
Make PathArgument cache its hashCode()

Recent tracing has shown that in badly-behaved workloads we can end up
performing a lot of hash-based lookups with a PathArgument. This patch
adds the obvious CPU/memory tradeoff of having a lazily-computed and
cached hashcode.

Change-Id: I9407318377778c9852cbaa7c439d3be7824930a7
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-1668: make sure we preserve schema key order

Fixes up callers to preserve key ordering as defined by schema, or as
passed in from external components.

At the same time fixes the parser to not emit duplicate entries into the
key list.

Change-Id: I55667cbb9ea0609d879b38452c6c98fcbd8b2e7e
Signed-off-by: Robert Varga <rovarga@cisco.com>
Merge changes I55667cbb,I94073183,Ib87cc0ec

* changes:
  BUG-1668: make sure we preserve schema key order
  Make PathArgument cache its hashCode()
  JSONNormalizedNodeStreamWriter: unify constructors