debug.el: Prevent re-entering the debugger for the same error

We can have several active `handler-bind`s that all want to invoke the
debugger, in which case we can have the following sequence:

- The more deeply nested handler calls the debugger.
- After a while the user invokes `debugger-continue`.
- `signal_or_quit` propagates the error up the stack to the
  second handler, which calls the debugger again.
- The user thus ends up right back at the same place, as if
  `debugger-continue` had not be processed.

Fix this by remembering the last processed error and skipping
the debugger if we bump into it again.

* lisp/emacs-lisp/debug.el (debugger--last-error): New var.
(debugger--duplicate-p): New function.
(debug): Use them.
2 jobs for master in 105 minutes and 11 seconds (queued for 10 seconds)
Status Job ID Name Coverage
  Build Images
failed #82674
build-image-inotify

01:45:11

 
  Normal
skipped #82675
test-lisp-emacs-lisp-inotify
 
Name Stage Failure
failed
build-image-inotify Build Images There has been a timeout failure or the job got stuck. Check your timeout limits or try again
#12 1633.   ELC      progmodes/js.elc
#12 1634. ELC progmodes/json-ts-mode.elc
#12 1634. ELC progmodes/ld-script.elc
#12 1634. ELC progmodes/lua-ts-mode.elc
#12 1634. ELC progmodes/m4-mode.elc
#12 1634. ELC progmodes/make-mode.elc
#12 1635. ELC progmodes/meta-mode.elc
#12 1635. ELC progmodes/mixal-mode.elc
#12 1635. ELC progmodes/modula2.elc
#12 1636. ELC progmodes/octave.elc