json parser BUGFIX validating lists and leaf-list

when a list/leaf-list had multiple instances in JSON, the validity
and when flags were set only on the first instance. Therefore, e.g.
in case of false when condition only the first instance was removing
while the following remained.

Fixes #264
diff --git a/src/parser_json.c b/src/parser_json.c
index 1d0f3df..ef948e7 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -542,6 +542,10 @@
             new->prev = (struct lyd_node *)leaf;
             leaf->next = (struct lyd_node *)new;
 
+            /* copy the validity and when flags */
+            new->validity = leaf->validity;
+            new->when_status = leaf->when_status;
+
             /* fix the "last" pointer */
             first_sibling->prev = (struct lyd_node *)new;
 
@@ -1170,6 +1174,10 @@
                 new->prev = list;
                 list->next = new;
 
+                /* copy the validity and when flags */
+                new->validity = list->validity;
+                new->when_status = list->when_status;
+
                 /* fix the "last" pointer */
                 first_sibling->prev = new;