config: allow locking the configuration

This lock allows a reader to lock the configuration from updating when
it is reading a complex configuration.
config: document current write behaviour in a test

On set, we set/add the value written to the config's internal values,
but we do not refresh old values.

Document this in a test in preparation for the refresh changes.
config: initial read/write locking