This patch adds pthread_key_create() and pthread_{get,set}specific(). There's a maximum of 64 thread-specific keys for simplicity. Key destructors are not invoked on thread exit.