BUG-1440: introduce SchemaTracker and use it

Extracts schema tracking from the XML writer, exposes it to the outside
world and teach yang-data-codec-gson how to use it.

Change-Id: I6794273caf75d9c0d94fa7db272acb45f6a34364
Signed-off-by: Robert Varga <rovarga@cisco.com>