search: Remove global variable that could get leaked

Tracker GSettings were previously stored in a global variable. This
seems to have been done to avoid difficulty passing the settings via
callbacks. Global variables are easy to leak and make mistakes with.

Update the code to have better callback handling so the variable can
be stored inside the object.
11 jobs for search-global-variable in 3 minutes and 54 seconds (queued for 2 seconds)
latest
Status Job ID Name Coverage
  Build
passed #200188
build

00:01:51

 
  Test
passed #200190
asan

00:02:02

passed #200189
test

00:00:43

 
  Manual
manual #200195
allowed to fail manual
armv8
manual #200191
allowed to fail manual
flatpak
manual #200194
allowed to fail manual
msan
manual #200196
allowed to fail manual
ppc64le
manual #200192
allowed to fail manual
tsan
manual #200193
allowed to fail manual
ubsan
 
  Review
manual #200197
allowed to fail manual
review
manual #200198
allowed to fail manual
stop_review