Aggregations: Scriptable Metrics Aggregation

A metrics aggregation which runs specified scripts at the init, collect, combine, and reduce phases

Closes #5923
Maybe the name should reflect the fact that this is a metric aggregation to leave some namespace if we have a scripted bucket agg some day?