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.