wp: invalidate WpGlobal id when removed from registry

Once an object is removed from the registry, its id is invalidated and
can be later reused by other objects. WpGlobal objects may be
long-lived: e.g. those in tmp_globals may live over an add,remove,add
sequence for the same id, and a new WpGlobal must be used for the second
add. However, currently e.g. wp_registry_prepare_new_global may pick the
WpGlobal for a previously removed object from the tmp_globals list.

To address this, invalidate the WpGlobal id immediately when we get the
registry remove event.
7 jobs for global-add-rm-add in 2 minutes and 42 seconds (queued for 2 seconds)
Status Name Job ID Coverage
  Container
passed container_fedora #15709925

00:00:19

passed container_ubuntu #15709926

00:00:20

 
  Build
passed build_on_fedora_no_docs #15709928

00:00:50

passed build_on_fedora_with_docs #15709927

00:01:19

passed build_on_ubuntu_no_gir #15709930

00:00:57

passed build_on_ubuntu_with_gir #15709929

00:01:09

 
  Analysis
passed shellcheck #15709931

00:01:03