Eliminate race in merge_subtiles_by_key_closure.

Fixes #327
Merge pull request #328 from jaredhoberock/merge_sort

Eliminate race in merge_subtiles_by_key_closure.