Aggregations: Scriptable Metrics Aggregation

A metrics aggregation which runs specified scripts at the init, collect, combine, and reduce phases

Closes #5923
I think we should use a shorter variable than `aggregation` in the script. How about `_agg`?