search-directory: simplify start/stop search code

Keep code to start and stop the search engine in a single place, create
it together with the directory and simplify start/stop invariants.
query: move string matching code in NautilusQuery

This also allows us to use a heuristic to evaluate how good the filename
match is.
file: don't check nautilus_file_is_in_search() when getting relevance

This checks the URI, so it will always return FALSE, since files in
NautilusSearchDirectory have the real URI of the location.
search-hit: set a limit to FTS weight in matches

We don't want this to become bigger than the proximity bonus.
query: change raking to always sort closest files first

And among those with the same distance from the search root, add more
bonus for recency and FTS rank. This ensures results don't move too much
when searching recursively.

Also, while we're at it, change the code to use GFile instead of simple
string comparisons.
search-engine-simple: clear active search before calling finished

So that start() will work if called directly from the finished callback.
search-directory: set show hidden files on query according to monitors

This ensures the simple engine won't crawl in hidden directories, unless
necessary.
search-engine-model: clear active search before calling finished

See previous commit.
simple-engine: always emit finished, even when cancelled

Otherwise the search hits hash table won't be cleared when search is
stopped, leading to missing results.
search-engine-simple: don't send last batch when cancelled

There's no need to send a last batch of results if we are returning
because of a cancellation.
window-slot: reset floating bar details when setting load status
search-engine: refactor providers status check

Make sure that we emit either finished or error when all the providers
have finished.
search-engine: wait for all engine's completion before starting

When we're getting reloaded, we should wait for the completion of all
engines before triggering a new search. When this happens, set an
internal restart flag and apply it when the last provider returns.
This avoids finished signals from providers that complete the previous
search after a while to being interpreted for the current search.
tracker-engine: apply basename heuristic to tracker hits too

So that they get the same kind of bonus they would if they matched with
the other engines. The FTS rank that tracker gives us is added as
another bonus.
Remove unused NautilusMergedDirectory

This is completely unused now.
search-directory: fix a FIXME

Using an auxiliary hash table gives us better performance for large
directories, as we avoid constantly walking the list.
search: add debug output
search-directory: use g_hash_table_add()
search: remove unused hits-subtracted signal

Since this is never emitted, keeping the code around just makes it more
complicated.
application: call gtk_init() manually when doing self checks

We used to do this implicitly, but
6b5ffd4e8841202d31e444358b542ffbeac516bf made it necessary to call it
manually, since we avoid g_application_register() when we perform self
checks.