metrics: use a Metrics class instead of metrics variable for accessing to the metrics. This is the same as Clock, Cache, Window etc... closes #1126