Geary window does not open due to race condition: Bug #737811

Although prior fix for bug #737811 solved problem for some users,
apparently Geary still had an issue when upgrading a database with
new GLib Mutex implementation, which uses Linux's futexes whenever
available.  This solution gives the notifying thread a chance to
signal the waiter that its work is completed.