Make text_extents much faster by reusing PangoLayouts.