assistant_tool: Reduce locking in `ToolWorkingSet` (#26605)

This PR updates the `ToolWorkingSet` to reduce the amount of locking we
need to do.

A number of the methods have had corresponding versions moved to the
`ToolWorkingSetState` so that we can take out the lock once and do a
number of operations without needing to continually acquire and release
the lock.

Release Notes:

- N/A
e60e8f3a0aMarshall Bowers committed on 3/12/2025, 9:26:26 PM· committed by GitHubparentedeed7b
1 file changedLine totals unavailable