Allow context "parameter" for modX->getTree()

This might not be the proper approach, but for some reason, modX->resourceMap is always empty.
This PR adds a third parameter, à la modX->getChildIds(), to allow filters.