application: Don't crash if a primary instance is already present

The dbus_unregister method can be invoked more than once and be
interleaved with dispose. We should not try to unexport a NULL
SearchProvider. Let's clear the reference and check for NULL in
dbus_unregister, and do the same in dbus_register if we failed to
export.

Based on code from gnome-terminal.
tracker-change-monitor: Use meaningful names
tracker-change-monitor: Plug a memory leak

Trying to avoid copying the TrackerChangeEvents led us to leaking them
if the query to resolve their IDs failed. Let's not do that.

Fixes: https://bugzilla.gnome.org/735746
tracker-change-monitor: Guard against failure to resolve IDs

I can't think of a reason why this will happen unless we are hitting
some bug in Tracker, but it is happening in the wild. So let's guard
against such scenarios.

Fixes: https://bugzilla.gnome.org/735746
Prepare 3.13.92