Optimize draw_tabs_and_spaces

Do not query the location for every char.
Rather find the last char in the line still in the drawing rect and only
query the location for every char that really needs to be drawn.
This reduces the number of times we call gtk_text_view_get_iter_location.

Fixes Bug #710973