Allow threads to attach and detach more easily
Array.indexOf/lastIndexOf implementation (refs HaxeFoundation/haxe#1242)
Fix stack marking when large allocation causes collect