[application] port to (G|Gtk)Application (GTK2/3), from libunique

Adapted for GTK2 & GTK3 from:
application: make NautilusApplication a GtkApplication subclass
http://git.gnome.org/browse/nautilus/commit/?id=b03b081e91d376140e4fc94fd885bf7d13fc57c5
[main] adapt to GApplication/GtkApplication changes

This code should be much easier now that window lifecycle is handled by
GApplication/GtkApplication

http://git.gnome.org/browse/nautilus/commit/?id=a8481ee4bd8d34e792d63598fa5efb47736f9de4
[src] use new GApplication/GtkApplication API to handle windows

instead of (removed) caja-main/CajaApplication functions to register
windows within the mainloop

Adapted from:
http://git.gnome.org/browse/nautilus/commit/?id=7500dd445df5a0cf082464f099169666727f6ec2
[desktop-window] monitor the desktop dir key from CajaDesktopWindow

We removed that code from CajaApplication, as it didn't belong there.

http://git.gnome.org/browse/nautilus/commit/?id=0712652a5f3730d10bca4040b68f3dda1e98c0bf
[application] make sure to initialize GTK+ during _startup()

http://git.gnome.org/browse/nautilus/commit/?id=2d702e1eeb7f9a8ad1286db39f5088bf39f1229c
[application|main] move other init/cleanup functions to the app class

instead of mixing them between caja-main and caja-application

http://git.gnome.org/browse/nautilus/commit/?id=56dd8bb3d5594d9caffda23400f7bd64c94e5a4c
[application] remove get_n_windows(), and add desktop window to window list

So that we don't quit immediately when we close the browser window.

Adapted for GTK2 & GTK3 from:
http://git.gnome.org/browse/nautilus/commit/?id=248339e40908fc58a5edad462c77b667d5cb8315
http://git.gnome.org/browse/nautilus/commit/?id=e297d4108760e701b3cd276e9d4612b1933efee0
[application] respect the "exit-with-last-window" setting

If it's set, we quit immediately.

Adapted for GTK2 & GTK3 from:
http://git.gnome.org/browse/nautilus/commit/?id=48f17e3726bc0e37d35714d5f18ce56498508d79
http://git.gnome.org/browse/nautilus/commit/?id=df8bdf21cffc1b2370b34173487219ee3568d040
[application|main] perform checks in CajaApplication if requested

instead of in caja-main

http://git.gnome.org/browse/nautilus/commit/?id=13630f0b4d58e3b2be6781f3049d13c1095b0dca
[application|main] properly handle --no-default-window

http://git.gnome.org/browse/nautilus/commit/?id=8d9d6128b69e641c2b77322e8832be8ae0b9bf93
[build] simplify configure, remove support for old exif/exempi APIs

For reference:
http://git.gnome.org/browse/nautilus/commit/?id=393df7a83c0a779784095a993db238867daeaa7a
http://git.gnome.org/browse/nautilus/commit/?id=305d1b05896e39a5e3181247d9d4e837b4c35067
[application] close desktop windows on quit

http://git.gnome.org/browse/nautilus/commit/?id=e383af25948a9b93915b1c39ae379bf0eace06ac
[smclient] backport and tweak a patch for late SMClient initialization

http://git.gnome.org/browse/nautilus/commit/?id=d09b45c72bb1c3573b8f1c0bc83f1d8448ba5309
[application] fix interaction with SMClient

Use late-initialization, otherwise we and up locked while reading
session information. Also, don't try to use that information more than
once in the app lifetime.

http://git.gnome.org/browse/nautilus/commit/?id=f48796637854ca784f7458a387e3607917ef5990
[application] use prettier format strings

http://git.gnome.org/browse/nautilus/commit/?id=d8ad1ab61cdb9929a8cb4f7d393e8b501e054289
[build|src] bump glib to 2.28 for GApplication, remove glibcompat.h

which is no longer needed as it only offered compatability up to glib 2.28.
[build] use X11 pkg-config files (replaces custom checks), remove old X_LIBS var

build: use X11 pkg-config files instead of homebrew checks
http://git.gnome.org/browse/nautilus/commit/?id=57f92209189de791904b014f49b8a383ca1a5bd2

build: remove old X_LIBS variable
http://git.gnome.org/browse/nautilus/commit/?id=20c94e66a20a9d2d4643ce58b2696bbf5e5334b8
[application] fix some bad interactions with GApplication

http://git.gnome.org/browse/nautilus/commit/?id=4882f2ac24dfcf33e06e5e9a06dd2cd0368069ec
[application] fix interaction with the session manager

The porting to GApplication broke the session management code that took
care of saving and loading existing windows if the session saving is
active.

We now fix it by changing a bit our startup process, so that the
EggSMClient object is actually created at the right time.

http://git.gnome.org/browse/nautilus/commit/?id=7c042f64ee59d9f149252f7e78e11ca6ad7d9dbe
remove eel_g_hash_table_new_free_at_exit()

Especially when references can be owned by non-resident modules,
this is just too dangerous.
https://bugzilla.gnome.org/show_bug.cgi?id=670989

Based on:
http://git.gnome.org/browse/nautilus/commit/?id=0d46b0620b3b120cde310cb2319c309d8f3e3b82