Fix unfreed memory during errors
Fix unfreed memory during errors

This fixes most (or all?) of the cases where memory is unfreed due to skipping
straight to the exit after encountering an error. I'm using a trick where I
call stack_top_item() instead of stack_pop_item() until _after_ the potential
error, at which point I pop and free. That way, the item is kept on the stack
and automatically freed when stack_free() is called in the general cleanup code.

bmars/shunting-yard,bmars/shunting-yard