use a collapsing queue to store tab move history

this eliminates an edge case where programmatically moving a tab while a
tab is pressed would screw up the internal state.