bar: update text rotation algorithm
bar: update text rotation algorithm

* If rotation is needed:
  - inside texts are rotated counter-clockwise.
  - outside texts are rotated clockwise or counter-clockwise, so that
    the text is laid along the bar end.

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