consolidate scm_i_register_weak_gc_callback, update weak-set to fit
* libguile/finalizers.h:
* libguile/finalizers.c (scm_i_register_weak_gc_callback): New internal
helper, from weak-set.c.
Relative to the previous weak-set.c version, prefer the
finalizer-based implementation. Fix bug regarding confusion between
scm_before_gc_c_hook and scm_after_gc_hook. Fix bug regarding
referencing weak values outside of the alloc lock.
* libguile/weak-set.c (GC_move_disappearing_link): New stub.
GC_move_disappearing_link is only available in libgc 7.3.
(move_weak_entry): Use the new stub instead of ifdeffery.
(resize_set): Now that we run finalizers from a separate thread or
async, we can keep the lock while reallocating the set vector.
(do_vacuum_weak_set): For the same reason, always lock the set.
Remove implementation of scm_c_register_weak_gc_callback in preference
of the new copy in finalizers.c.
(scm_c_make_weak_set): Use the new scm_i_register_weak_gc_callback.