Need a way to detach a thread externally when its address is unknown

This is for https://issues.dlang.org/show_bug.cgi?id=12812

The specific use case is with D-fuse, where it's necessary to detach all but the main thread at exit before the GC terminates, or a crash occurs.  These threads are managed by the D-fuse library and so there's no opportunity to call thread_detachThis.  Add a routine that allows threads to be detached by some other means.