Fixed renumber + sorting of sub nodes

Replace renumber via SQL query by renumber based on WP's sorting
This renumber occurs on inserting page "after" existing page.

Fixed sorting of subnodes by resorting during conversion of object tree to json.