Legend: compute size only after drawing texts
Legend: compute size only after drawing texts

* This change not only improves drawing performance, but it will also
  allows for `drawTexts` to be moved to `styles.js`.

* Checked all jasmine and image tests still pass.

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