Add a synchronous way to get parser change ranges (bug#78402)
This commit only adds the new function, the fix for the bug is
in the next commit.
* doc/lispref/parsing.texi (Using Parser): Add docs.
* lisp/treesit.el (treesit): Add shortdoc.
* src/treesit.c (treesit_get_affected_ranges): New function
extracted from treesit_call_after_change_functions.
(treesit_call_after_change_functions): Extract out.
(treesit_ensure_parsed): Return affected regions.
(Ftreesit_parser_changed_regions): New function that returns the
affected regions.
(cherry picked from commit
564b947745b2a685edcd93eb8f0d8825352030b8)