treefmt: refactor `withConfig` and `buildConfig` to use `evalConfig` (#406685)
Introduces a new modules-based implementation that is used by both
`withConfig` and `buildConfig`.
Previously we used a module eval for `settings`. This PR makes it so
that all args passed to `withConfig` are now module options. `settings`
is now a submodule of the wider `evalConfig` configuration.
As well as being a better overall design (IMO), using a module eval
enables adding additional options in the future. E.g. we could add
`programs` options similar to those maintained by treefmt-nix.
authored by Matt Sturgeon and committed by GitHub 0858f1bc 6f5afe34