Name threads on Linux properly

I implemented this as part of the OpenELEC project.

It helps debug issues if we can easily identify the XBMC thread by name. This patch implements just that.