Signal handlers with dead weak references are only cleaned up
when using signal_emit. If no signals are emitted, dead signal
handlers will accumulate. This is avoided by adding the function
signal_garbage_collect() and calling it in env.garbage_collect()