data tree FEATURE schema-ordering of data

All (leaf-)list instances preserve their input
order, new instances inserted at the end.
Opaque nodes are at the end, after all the
standard nodes.

Also, now first instances of (leaf-)lists
are inserted into hash table twice, second
time without their keys/value in the hash.
diff --git a/src/parser_lyb.c b/src/parser_lyb.c
index 95ff05a..2f6f8df 100644
--- a/src/parser_lyb.c
+++ b/src/parser_lyb.c
@@ -892,8 +892,11 @@
         attr = NULL;
     }
 
-    /* insert */
+    /* insert, keep first pointer correct */
     lyd_insert_node((struct lyd_node *)parent, first, node);
+    while (!parent && (*first)->prev->next) {
+        *first = (*first)->prev;
+    }
     node = NULL;
 
 stop_subtree: