Template class to perform merge sort on a given input vector.