Initial, very broken, implementation of threads

Well, the thread-creating should work, but nothing is threadsafe.