serialization_sort: Allow direct access to internal sort buffer.

Change serialization_internal_sort to allow direct access to the sorted
buffer, rather than using operator=.
serialization_sort: Make the merger look more like a priority queue.

Using top() and pop() instead of can_pull() and pull() reduces the
unnecessary copying of items.