Add a hook to run callbacks in the gui thread. This should fix concurrency issues caused by the machoine and gui threads using the same memory. The most common symptom of that is Plover locking up in the add translation dialog.