Merge arrays with length == 2

Code changed from having single conditional, comparing two elements
and then returning to doing the comparisons in a loop.

This version does not use recursion. The code will have to be
refactored so that the logic in #merge moves to #sort.