add tests for empty sequences
fix results ordering
refactor sequence merging method to simplify testing
add test for out of order merging
Merge pull request #869 from metamx/fix-results-ordering

Fix results ordering on broker