1.0.8.19: :dont-safe finalizers and fd-stream thread safety issues
* Add :DONT-SAVE keyword argument to FINALIZE, which causes the finalizer
to be removed when core is saved: it is not amusing to have a finalizer
that deallocates system memory to fire in a fresh image which happens
to have freshly allocated memory in the same address. Also good for finalizers
closing FDs.
Use where appropiate.
* Stream buffing should not use (INCF (BUFFER-FOO BUFFER) N), since if another
thread has written to the buffer since we last looked at it this might take
eg. the TAIL index beyond the end of the allocated memory area: by doing
(let ((foo (buffer-foo buffer))) ... (setf (buffer-foo buffer) (+ foo n)) we might
overwrite the data from another thread, but at least we won't trash memory.
* Small graces: check that ALLOCATE-SYSTEM-MEMORY actually succeeds, don't accept
finalizers for NIL (they would just run immediately on next GC, which is almost
certainly not intended), take an extra mile to ensure old buffers from before
SAVE-LISP-AND-DIE don't survive to the new image.