Fix a ton of deprecation warning from Cairo.
[Fixes bug #1305701] Fix some incorrect behaviour on Ubuntu 14.04.

It appears that the StrokeExtents() bug was fixed, so we now need to
manually call into cairo_stroke_extents to ensure that we get consistent
behaviour everywhere.

This was causing many issues, such as incorrect invalidation rectangles.