registry: change _prepare_new_global() to return the global in a less awkward way

the global is stored internally and the returned ref is only useful
in the WpProxy code, not in the registry_global() event
1 job for api-improvements in 3 minutes and 9 seconds (queued for 1 second)
Status Job ID Name Coverage
  Test
passed #1649577
build

00:03:09