Split threading.m into per-platform files