SLING-4506 - Java APIs not consistently available in JavaScript * added getName() and getResourceType() for Resource in addition to name and resourceType properties