Only load indexed scripts from the .scripts index.

Only allow ScriptService to read indexed scripts from the .scripts index.
Change the tests to index the test templates into the .scripts index.
This will prevent users from creating and loading scripts from arbitary
indices.

See #4921