Made SearchState thread safe to fix a bug (segfault).
See also http://www.justsoftwaresolutions.co.uk/threading/thread-safe-copy-constructors.html
for explanation of the changes (EinMByte).