Fix performance issues in project search related to detecting JSX tag auto-closing (#30842)

This PR changes it so we only create a snapshot and get the syntax tree
for a buffer if we didn't detect that auto_close is enabled.

<img width="1205" alt="Screenshot 2025-05-16 at 21 10 28"
src="https://github.com/user-attachments/assets/1ada445f-77bc-4c7c-bffe-953f34ee5384"
/>


Release Notes:

- Improved project search performance
a824119367Remco Smits committed on 5/20/2025, 11:37:09 PM· committed by GitHubparent16366cf
1 file changedLine totals unavailable