Fixes memory leak when an exception goes through runCvc4(). (Fixes #4590) (#4750)