tooltip: improve resizing and text wrapping logic
Fixes cases where the tooltip would wrap the text in unnecessary situations
And also removes the scrollbar margins when theres no scrollbar
example with typescript LSP:
before:
after:
it also fixes horizontal scrollbars sometimes making tooltips completely unusable (example with json LSP):
before:
after:
would appreciate some testing with other language servers, i mostly tested it with cland, typescript LSP, and json LSP, and didn't find any situation where it looks worse than before





