Add directive option to inject arbitrary functions to treeitem scope

Allows arbitrarily defined functions on the parent scope to be run on each node list item. Useful for allowing multiple interactive UI elements on each tree item.