tasks: Fix return values

https://bugzilla.gnome.org/show_bug.cgi?id=712565
core: Replace deprecated GStaticMutex with GMutex

https://bugzilla.gnome.org/show_bug.cgi?id=712565
demos: Fix GtkStock deprecated functions

https://bugzilla.gnome.org/show_bug.cgi?id=712565