First real commit

Added thread.go, Thread type and functions for scheduling code on
threads.