BUG-4638: fix resolveLeafSchemaNodeAsMethod()
Deal with new parser's way of emitting types for leaf and not using
ExtendedType. Backward compatibility with the old parser is maintained.
For new parser, the input into code generation will change in case an
the leaf defines a default value: the type will have a default value and
its schema path will match the leaf.
Code generation will need to deal with this and emit the same code
snippets, effectively fudging the inner restricted type. That will be
addressed in a follow-up patch.
Change-Id: If66305d2716a138628ba84e651bb280d588cb773
Signed-off-by: Robert Varga <rovarga@cisco.com>