Minor optimization of line number length logic (#26845)

In `layout_excerpt_gutter`, compute max line number length once instead
of for every row

In `max_line_number_width`, use ilog10 instead of converting to floats
and back

Release Notes:

- N/A
ef91e7afaeMichael Sloan committed on 3/15/2025, 7:28:50 PM· committed by GitHubparentc220fb3
2 files changedLine totals unavailable