Fix import to be Python 2.5 compatible
Make sure notifications are dispatched from the main thread

Otherwise there might be issues on some platforms - for example the
"Xlib: unexpected async reply" issue on Maemo 5 Fremantle, when the
platform specific notification was triggered from a thread other than the main one.