Improve use of multiple threads in sqlite3VdbeSorterRewind().
Minor fixes so that builds with SQLITE_MAX_WORKER_THREADS=0 work.