Minor: Add override to silence warning.
Move thread-local storage to new class.

- Also updated various comments and removed some unused, commented-out code, in
  DatabaseSearcher.
Revert non-multithread section to original version.