pixelcache: Split out a function

https://bugzilla.gnome.org/show_bug.cgi?id=726475
pixelcache: Add map/unmap functions

Because GTK does not invalidate windows that aren't mapped, we cannot
update the pixel cache when the window it handles isn't mapped. So we
add API to call when GDK windows get mapped/unmapped.

https://bugzilla.gnome.org/show_bug.cgi?id=726475
viewport: Call map/unmap functions on pixel cache

https://bugzilla.gnome.org/show_bug.cgi?id=726475
treeview: Call map/unmap functions on pixel cache

https://bugzilla.gnome.org/show_bug.cgi?id=726475
textview: Call map/unmap functions on pixel cache

https://bugzilla.gnome.org/show_bug.cgi?id=726475
pixelcache: Add a warning for an invariant that shouldn't happen

Pixel caches should be unmapped before being freed and unmapping clears
those variables.
tests: Add deprecation guards
testgtk: Don't call deprecated function in mainloop test
testgtk: Don't use deprecated functions in scrolling test
testgtk: Don't use deprecated functions in flipping test
testgtk: Clean up dialog example

Don't pass a static variable to a callback, when the static variable
could just be deinfed in the callback.
testgtk: Make dialogs example work without static variable

Makes it a bit more complicated, but meh.
testgtk: Don't use deprecated functions in dialogs test
testgtk: Don't use deprecated functions in scrolled windows test
testgtk: Don't use deprecated functions in event watcher test
testgtk: Don't use deprecated functions in progress bar test
testgtk: Remove rc file test

The test didn't work anymore since RC files stopped being used in 3.0.
testgtk: Don't use deprecated functions in selection test
tests: Make testlockbutton not use deprecated API
tests: Don't use deprecated functions in testselection