CMS-3921 Use javax.script API for scripting classes. Removed some rhino specific code.