Indexed Scripts/Templates : Changes from review comments.

Add ParseFields to ScriptService and use them to parse script json fields in requests.
Remove templateId from SearchRequest and use templateName with a ScriptType.
Add readTo and writeTo to ScriptService.ScriptType.
Add set<ScriptType>Script to UpdateRequestBuilder instead of passing in ScriptType in setScript.
Various cleanups and small fixes.

See #5921