Snapshot/Restore: Make sure indices cannot be renamed into restored aliases

Fixes #7915
Aggregations: makes script params consistent with other APIs in scripted_metric

This change removes the script_type parameter form the Scripted Metric Aggregation and adds support for _file and _id suffixes to the init_script, map_script, combine_script and reduce_script parameters to make defining the source of the script consistent with the other APIs which use the ScriptService
Added `_shards` header to all write responses.

The header indicates to how many shard copies (primary and replicas shards) a write was supposed to go to, to how many
shard copies to write succeeded and potentially captures shard failures if writing into a replica shard fails.

For async writes it also includes the number of shards a write is still pending.