legend: keep scrollbar position after toggle
legend: keep scrollbar position after toggle

* Only set the scrollbar position during first render.

* Only register the wheel and drag listeners during first render.

* If the scrollbar is to be shown, ensure only the expanded scrollbox is
  drawn.

Fixes #578

plotly/plotly.js,aburato/plotly.js,plotly/plotly.js,etpinard/plotly.js,etpinard/plotly.js,asolagmbh/plotly.js,iongroup/plotly.js,asolagmbh/plotly.js,aburato/plotly.js,iongroup/plotly.js,plotly/plotly.js,plotly/plotly.js,iongroup/plotly.js,etpinard/plotly.js,asolagmbh/plotly.js