posix: Add pthread TLS

This PR is (re)based on #821.

This PR implements the [POSIX thread-local storage][3].
Though it's not anything as nice as C11's `_Thread_local`, but it's something. [![Hosted by imgur.com][2]][1]

This implementation of POSIX TLS is not dynamic as the standard wants it to be. All keys have to be defined before the first pthread is created with `pthread_create()`. I see this as a minor shortcoming. Otherwise we'd need malloc, maps and so on. The additional convenience would not be worth addition work at runtime.

  [1]: http://knowyourmeme.com/memes/its-something
  [2]: http://i.imgur.com/4sbAaQ8.gif
  [3]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_key_create.html