[WIP] Add extra data to DocumentToArray return format for jstree 3 compatibility

Perhaps this doesnt belong here although the OdmTree method being modified is already returning data that is somewhat specific to the jstree plugin. This adds a few extra keys that would be necessary to allow it to serve the right data format for jstree 3
It seems a little strange that jstree specific code is in here. I think this DocumentToArray should just return some generic data which could be transformed to other formats which specific consumers might need but im not sure how to do with without causing BC breaks.