[log] Refactor: move ref painter & drawRefs & calc refs padding to the common parent class
[log] IDEA-116950 Don't display all tags if there are too many of them

* Adjust RefPainter so that it calculates padding for Strings instead
  of refs (using the same sizes as in drawLabel).
* When drawing refs, substitute tags (if there are more than 1 of
  them) with "first tag + N more" label.