Rework configuration parsing and loading to be thread safe.

Remove the previous `parse_configuration` method and split the functionality between
two new methods, `initialize` and `get_settings`. Each method uses a lock to ensure
that settings are only loaded and stored in a thread-safe way.