Fix `Key` interning race. (#12152)
Fix `Key` interning race. (#12152)

Previously a `Key` could be observed before it was added to the
`reverse_keys` mapping leading to a panic in `key_get`. That panic used
a debug format on the problematic key and the `Debug` impl for `Key`
indirectly uses `key_get`. This results in a panic while handling a
panic.

Fix the root cause of the panic, ensuring the panic can never happen
as was intended. Also fix the recursive use of `key_get` in the panic
for sanity sake.

Fixes #11926
benjyw/pants,benjyw/pants,benjyw/pants,pantsbuild/pants,benjyw/pants,benjyw/pants,benjyw/pants,pantsbuild/pants,pantsbuild/pants,benjyw/pants,pantsbuild/pants,pantsbuild/pants,pantsbuild/pants,pantsbuild/pants