Indexed templates/scripts : Return error message on 404

This commit adds support for messages such as :
````
{
  "status" : 404,
  "error" : "IndexedScriptMissingException[[asdasdasfe] missing]"
}
{
  "status" : 404,
  "error" : "IndexedSearchTemplateMissingException[[asdasdasdas] missing]"
}
````
When non existant indexed scripts and templates are requested from get and delete REST endpoints.

See #7325