enable user-defined isExpanded callback to treeBrowser

We are running into an issue where the flag used to detect if a node is expanded has name conflict with treeBrowser's. The proposed change abstracts this check with an optional user-defined callback in the is-expanded-callback attribute.