editor: Improve code completions by prioritizing prefix matching (#29456)

- Use common prefix length-based matching as primary criteria.
- Test added for multiple cases.

Before:
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/8c653225-cac2-41bd-95f0-0fb8724284c9"
/>

After:
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/a3d59399-cff2-435d-9b56-69a530f35da4"
/>

Release Notes:

- Fixed issues with code completions where they wouldn't show
completions with matched prefix at top.
f2b4004c00Smit Barmase committed on 4/26/2025, 11:45:48 AM· committed by GitHubparentec5821f
3 files changedLine totals unavailable