Scala: quicksort + binary tree