ScanLine: Change merge sort to natural merge sort

The natural merge sort should be more efficient for almost sorted lists.

Signed-off-by: Celelibi <celelibi@gmail.com>