[XLA] Refactor `BackendConfigWrapper` and add tests.
[XLA] Refactor `BackendConfigWrapper` and add tests.

This change:
- Folds `HloInstruction::GetBackendConfigInternal` into `BackendConfigWrapper` where is really belongs.
- Removes `mutable` from `HloInstruction::backend_config_`.
- Changes `BackendConfigWrapper` to use constructors wherever possible, instead of methods, so that the need for synchronization is reduced.
- Improves the documentation to correctly reflect that this class is symmetric with respect to which of its defining members was initialized first and which is the cache.
- Adds tests to ensure the new implementation is thread-safe.
