[DocsUI, Search]: Moves common functionality to SearchBot

Extracts common functionality added in ag/34384495 and ag/34147845 and
places it in SearchBot. Uses the new functionality to simplify the code
in SearchViewUiTest and SearchViewManagerTest

Bug: 428636317
Test: atest DocumentsUIGoogleTests
Flag: com.android.documentsui.flags.use_search_v2_read_only
Change-Id: I6e3f379e68f57cf31323614e3a4e315a31df6eda
2 files changed