Add threading code - but is not faster

For some reason the multi-threaded code does not perform better than a
single threaded code. Initial thoughts are perhaps the data should be
partitioned to the threads individual thread_data struct, instead of
pointing to a single shared data address.