This change adds a new trait -- `Builder` -- which defines a value that
can create new recorder instances.
As we have a need to generate owned recorders, in particular for
futures-based code, the `Builder` trait provides a way to do so without
any jankiness, such as the prior Clone-based approach.
As such, all exporters now expect a builder to be passed in, rather than
the recorder itself.
We now expose all exporters and recorders via facade modules in the
metrics crate, called metrics::exporters and metrics::recorders,
respectively. This means that the metrics crate itself has these are
optional dependencies, which are included by the default set of
features, and so can be turned off by consumers.
To curtail the issue of cyclical dependencies, we've also introduced
three new traits: MetricsSnapshot, SnapshotProvider, and
AsyncSnapshotProvider.
These traits let us represent metrics::Controller and
metrics::data::snapshot::Snapshot in the exporter, allowing us to get
around the cyclical dependency but also expose more flexibility and
modularity.