Allow buiding of QgsLegendModel from layer tree