Migrate the conceptual stack into a utility class

Introduces SchemaPathStack -- which is precisely what the concept is.
This hides away the implementation details, so they can be refactored as
needed.

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

With proper encapsulation it becomes clear how SchemaPaths can be
directly applied. Do just that, using
SchemaPath.createChild()/getParent() and use a Deque (backed by a
LinkedList) instead of an explicit Stack.

Change-Id: I14c86257c10228acd9d113f382f9fb891d6033b6
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-865: migrate to Optional<>

Change-Id: I35ae6fcb9b4a1445d06d4688ffea38b828f1a3c8
Signed-off-by: Robert Varga <rovarga@cisco.com>
Optimize YangParserListenerImpl logging

- make util methods static
- do not use string concat in warnings
- do not concat strings for trace

Change-Id: I7d0cf2958df5fb54b159c205ee33f75afe2fe23a
Signed-off-by: Robert Varga <rovarga@cisco.com>
NodeUtils: Use an ArrayDeque instead of a Stack

Thread-safety is not needed and it's likely to be faster.

Change-Id: Ib7f2ce87056d134fe8e7fc9695ec46da22058c8a
Signed-off-by: Robert Varga <rovarga@cisco.com>
NodeFactory: use an ArrayDeque instead of a Stack

Thread safety is not needed and it's likely to be faster.

Change-Id: I3b7b0bf5f16f5e5c587baacb40f403723775034b
Signed-off-by: Robert Varga <rovarga@cisco.com>
XmlTreeBuilder: ensure thread safety

Having a static field is a multi-threading show-stopper. Propagate the
state required via method argumets instead. Also convert Stack to
ArrayDeque.

Change-Id: I851fa16e648c0eb94ddc19f8ae9809b977c68564
Signed-off-by: Robert Varga <rovarga@cisco.com>
LazyNodeToNodeMap: use a ArrayDeque instead of a Stack

The thread safety feature is not needed and it should be faster.

Change-Id: I9886ddb7bdc69d27e489f5bff1cced5876d32aaa
Signed-off-by: Robert Varga <rovarga@cisco.com>
Merge changes I9886ddb7,I851fa16e,I3b7b0bf5,Ib7f2ce87,I7d0cf295,I35ae6fcb,I14c86257,Ic4af26d7

* changes:
  LazyNodeToNodeMap: use a ArrayDeque instead of a Stack
  XmlTreeBuilder: ensure thread safety
  NodeFactory: use an ArrayDeque instead of a Stack
  NodeUtils: Use an ArrayDeque instead of a Stack
  Optimize YangParserListenerImpl logging
  BUG-865: migrate to Optional<>
  Refactor SchemaPathStack
  Migrate the conceptual stack into a utility class