Fixed computation of stacked series in case some series start in the mid...

...dle of the range

The bug is caused by stale value of last_x local across loop in gatherDatasets_.
See https://code.google.com/p/dygraphs/issues/detail?id=438

Added test for the bug. All tests pass.
lint.sh reveals no new warnings