Most parts of `ApplyEnvOverrides` will check if the value is empty
before attempting to apply the environment override. One exception is
that when a type implements Unmarshaler and it is within a slice, it
does not check that an empty value was passed.
This change fixes it so that we will not call `UnmarshalText` when the
environment variable is set to empty.
This code has been duplicated to other projects and its implementations
have grown out of sync. Now the code can live as a package-level
function rather than a method coupled with particular structs.
Update support in the `toml` package for parsing human-readble byte sizes.
Supported size suffixes are "k" or "K" for kibibytes, "m" or "M" for
mebibytes, and "g" or "G" for gibibytes. If a size suffix isn't specified
then bytes are assumed.
In the config, `cache-max-memory-size` and `cache-snapshot-memory-size` are
now typed as `toml.Size` and support the new syntax.