Implement naive merge sort