allocator: Lock master key prefix when reusing existing cluster identity
allocator: Lock master key prefix when reusing existing cluster identity

The master key prefix was only allocated when a master key was freshly
allocated. When re-using a master key, there is a small race window in which
the a remote garbage collector can kick-in and delete the master key in between
the Get() and the creation of the slave key. The race would be immediately
fixed via the master key protection mechanism but it will lead to an
unnecessary delete and re-create event which will trigger unnecessary
regenerations. By locking the master key prefix earlier, the GC can be kept out
during the race window. The cost is a slightly slower allocation.

Signed-off-by: Thomas Graf <5f50a84c1fa3bcff146405017f36aec1a10a9e38@cilium.io>

cilium/cilium,cilium/cilium,cilium-team/cilium,michi-covalent/cilium,tklauser/cilium,scanf/cilium,scanf/cilium,cilium/cilium,tgraf/cilium,scanf/cilium,michi-covalent/cilium,scanf/cilium,tgraf/cilium,tgraf/cilium,michi-covalent/cilium,tgraf/cilium,michi-covalent/cilium,cilium-team/cilium,scanf/cilium,michi-covalent/cilium,tklauser/cilium,tklauser/cilium,tklauser/cilium,scanf/cilium,cilium/cilium,scanf/cilium,cilium/cilium,tklauser/cilium,tgraf/cilium,tgraf/cilium