bottom up merge sort, uses extra space but is stable