merge sort (scala)