Indexed Scripts/Templates: Add java client interfaces.

Added Java Client interfaces to mirror the REST endpoints and switched the rest endpoints to
use the java client interfaces.
Script languages are now validated at the endpoint/request level.
Moved all script services to ScriptService, validation now happens here.

See #5921