project: Use VecDeque in SearchHistory (#31224)

`SearchHistory` internally enforced the max length of the search history
by popping elements from the front using `.remove(0)`. For a `Vec` this
is a `O(n)` operation. Use a `VecDeque` to make this `O(1)`

I also made it so the excess element is popped before the new one is
added, which keeps the allocation at the desired size.

Release Notes:

- N/A
c50093d68ctidely committed on 5/23/2025, 11:25:40 AM· committed by GitHubparent1cad1cb
1 file changedLine totals unavailable