[composer] Fix incorrect calculation of scale for tick scale bars

QPainter::drawLine(x1,y1,x2,y2) takes int values, so coordinates
were being rounded to the nearest mm. Consequently scale was way
off. Also fixes horizontal line for tick styles being drawn
incorrectly with multiple overlapping segments. (fix #10685)