Now the VisitorKind type makes it easier to pass the correct args to the worker.
Used the new VisitorKind to simplify other parts of the code.
Created some type aliases to simplify the mainVisitor signatures.
Made getVisitorFunctions inline, for a slight performance improvement.
Removed specialized versions of forkWorkerThread.
Created and tested Worker variant of searchVisitor.