Fix indentation

Change mixed tab-space indentation to purely space-based.
Patch glib to set thread names on OS X and iOS

Integrate patch that was submitted upstream as
https://bugzilla.gnome.org/show_bug.cgi?id=741807