CMS-4294 TreeGrid - Performance issues
api.dom.Element constructor: Replaced usage of api.util.getModuleName to decided whether to generate id or not with api.util.distanceTo
This improves performance, since api.util.getModuleName is quite slow.