Scala Implementation of Merge Sort