use naked asm blocks to clear registers
fix Issue 12800 - Fibers are broken on Win64

- save non-volatile registers RSI and RDI
Merge pull request #1012 from MartinNowak/fix12800

fix Issue 12800 - Fibers are broken on Win64
do not try to detach a thread that isn't running yet
Merge pull request #1016 from rainers/unittest_thread_detach

Fix unittest in core.thread