* lisp/emacs-lisp/syntax.el: Rework the handling of nested calls.

Nested calls to `syntax-ppss` and `syntax-propertize` can easily
happen unexpectedly via ondemand propertizing or `forward-sexp`.
Refine the handling of nested calls so we detect them more reliably
(e.g. also within `syntax-propertize-extend-region-functions`)
and so that the `syntax-ppss` cache is automatically flushed in case
it might have been filled with data that's become obsolete since.

(syntax-propertize--inhibit-flush): Delete var.
(syntax-propertize--in-process-p): New function to replace it.
(syntax-ppss-flush-cache): Use it.
(syntax-ppss--updated-cache): New var.
(syntax-propertize): Make `syntax-propertize--done` binding apply to
`syntax-propertize-extend-region-functions` as well, as intended (fixes
bug#46713).  Use `syntax-ppss--updated-cache` to flush
syntax-ppss cache at the end when needed.
Don't bind `syntax-propertize--inhibit-flush` any more.
(syntax-ppss): Set `syntax-ppss--updated-cache` when applicable.
2 jobs for master in 33 minutes and 26 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Build Images
passed #48263
build-image-inotify

00:29:51

 
  Normal
failed #48264
test-lisp-emacs-lisp-inotify

00:03:35

 
Name Stage Failure
failed
test-lisp-emacs-lisp-inotify Normal
$ find ${test_name} ! \( -name "*.log" -o -name ${EMACS_TEST_JUNIT_REPORT} \) -type f -delete
$ find ${test_name} -type d -depth -exec rmdir {} + 2>/dev/null
Uploading artifacts...
test-lisp-emacs-lisp-inotify-6a96d177/: found 62 matching files
Uploading artifacts to coordinator... ok
id=48264 responseStatus=201 Created token=P-_oNaqs
Uploading artifacts...
test-lisp-emacs-lisp-inotify-6a96d177/junit-test-report.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=48264 responseStatus=201 Created token=P-_oNaqs
ERROR: Job failed: exit code 2