Bug 1781: Fix serialization of leafrefs

- added functionality to read schema node which is type of leaf ref and
  points to leaf ref, identity ref, instanceidentifier or typedef node.

Change-Id: I150847b859ac0616c2cf160192bb712aea8202bb
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Merge "Bug 1781: Fix serialization of leafrefs"