Implement GC_thread_unregister_foreign for pthread based platforms. Call it from mono_gc_unregister_thread.