Ordering of questions: improve input array

*edit.js: create a js object with key= $pageId and val=array with
children in correct order
*questionnaireNode: improve function it now takes
parent=>array(children)