test-after-change-hooks now works on incremental.

Previously, we could not use test-after-change-hooks to run
after-changes which have occurred incrementally. We now have a debug
mode which always tracks the last change events (even in emergency
state). This allows running of the hook with these values.
Use unwind-protect in test forms.

This ensures buffers are closed even after crashes. Otherwise,
exceptions pollute following tests.