Windows atomic and thread

Todo check equality comparison in thread.c, see #95
Fixes #94