Support dumping tree-sitter query (bug#69952)
Previous commit allows Emacs to dump tree-sitter queries by simply
dumping the query string and language symbol, and left the query object
and cursor object as NULL. This commit makes sure Emacs doesn't crash
when loading the dumped query, by make sure Emacs can handle the case
where the cursor is NULL.
* src/treesit.c (make_treesit_query): Initialize query with null cursor.
(treesit_ensure_query_cursor): New function.
(treesit_initialize_query): Ensure cursor is non-null.
* src/treesit.h (Lisp_TS_Query): Update documentation.
(cherry picked from commit
1abf3bdd7edcd405d4ccb4ef4de38068348f4b95)