Do most of the work for global destructors.

They don't work yet.