gtkicontheme: check for GdkPixbuf first

We checked for G_IS_LOADABLE_ICON() before GDK_IS_PIXBUF().

Since we made GdkPixbuf implement GLoadableIcon, the special case for
pixbufs is never used, and the much much slower GLoadableIcon path is
taken instead.  Move the GdkPixbuf one to be first to fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=705320
Reset cursor when mouse leaves a toplevel window.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=692548
Bug 701571 NSApp doesn't notice NSWindow destruction

Part 1 of the fix; part 2 awaits Glib developer approval (see
https://bugzilla.gnome.org/show_bug.cgi?id=704374) and is more
correctly associated with
https://bugzilla.gnome.org/show_bug.cgi?id=674108

(cherry picked from commit ccc30ea91966d0ec048a20530c892dfcace96b2b)
Bug 705181 Annoying beep on arrow keys

Original patch was a bit excessive, just needed to not forward the command.

(cherry picked from commit 40c429c2cbe20f5a471b6594bd0bd163e78628b6)
Bug 705182 Reset Cocoa IME state when immodule is reset

Commits the pre-edit string on receipt of focus_out and reset
commands.
Patch refinements by Cody Russell <bratsche@gnome.org> and
Ek Kato <ek.kato@gmail.com>

(cherry picked from commit e8b6b806250c1f958c33920c60ed41ab88016767)
Fix a crasher that was introduced by 9ca802161ec6387419d160f21fe477008a567477
due to preedit_str being initialized as an empty string rather than NULL.
Bug 705750 Quartz input method doesn't work correctly for Chinese characters

Modified from original for Gtk3.

(cherry picked from commit bc35d5d166bcc4ec8ac074b792cc88f4f98c282e)