[internal] Add context manager to handle temporary unfreezing of `frozen_after_init` objects (#16863)
[internal] Add context manager to handle temporary unfreezing of `frozen_after_init` objects (#16863)

This adds a safer way to temporarily unfreeze `frozen_after_init` objects, for example in tests. The API is not exposed to static typing (just like the existing `_unfreeze_instance`), but it will re-freeze once finished.
pantsbuild/pants,pantsbuild/pants,pantsbuild/pants,benjyw/pants,benjyw/pants,pantsbuild/pants,benjyw/pants,benjyw/pants,pantsbuild/pants,benjyw/pants,pantsbuild/pants,pantsbuild/pants,benjyw/pants,benjyw/pants