Merge algorithm

Added a merge_path kernel and a merge algorithm based on it. Also changed merge to use the new algorithm.

For now, I have changed only the overload without the comparison function. I'm planning to work on adding overloads for many functions to more closely match their STL counterparts after my GSoC and I'll change this one then.