Revert "Revert "Single-thread merge sort""

This reverts commit 1b50d6163ee450ef2edbf1e5a03170d17074bf81.