Use the correct access when computing bounded y-values for constrained panning.

Dygraphs was computing the second y-axis using extreme range of the first y-axis. This fixes bug 294, setting panEdgeFraction to non-zero breaks secondary y-axis label computation.

Also add a minor optimization by moving a computation outside the axis loop.
Merge pull request #224 from kberg/i294

Use the correct access when computing bounded y-values for constrained panning.
Merge pull request #225 from vlsi/master

Fix wrong values in legend when using stackedGraph with missing values
Fixed computation of stacked series in case some series start in the middle 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