add collapseAll/expandAll action in query result tree table context menu
some code cleanup