restore a generator's caller's exception state both on yield and (last) return

This prevents generator exception state from leaking into the caller.

Closes #12475.
diff --git a/Misc/NEWS b/Misc/NEWS
index e0aaa8d..a05cc36 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@
 Core and Builtins
 -----------------
 
+- Issue #12475: Prevent generators from leaking their exception state into the
+  callers frame as they return for the last time.
+
 Library
 -------