Basic collection tree to json method

This is just and example of the underlying SQL method. It currently uses the legacy moduleid to select the collection. e.g. 'select * from tree_tojson('col10522')' will retrieve a single row w/ the json for Collab Stats.