config: refresh on delete

When we delete an entry, we also want to refresh the configuration to
catch any changes that happened externally.

This allows us to simplify the logic, as we no longer need to delete
these variables internally. The whole state will be refreshed and the
deleted entries won't be there.
config: refcount the values map

This is mostly groundwork to let us re-use the map in the snapshots.