Prevent local property leaks when an error occurs in the body of a block
Local properties were being leaked when an error occurred inside the
body of a block:
(%i1) block ([f], local (f), f () := foo, error ("d'oh"))$
d'oh
-- an error. To debug this try: debugmode(true);
(%i2) f ();
(%o2) foo
If the block didn't use local, a superfluous NIL would be left over
in LOCLIST.
This all caused the cleanup of local properties to be one frame
behind. An error in nested blocks would make it multiple frames
behind if the error was in an inner block.
Now use UNWIND-PROTECT to ensure that MUNLOCAL gets called when
leaving a block.
The test suite runs fine. As with commits 9387d6 and da781a, I'm not
sure how to add a test for this since we need to cause an error, but
using errcatch prevents the leak.