Reset graphic context settings consistently

Not only did transform need to get reset, but also anti-aliasing and
linecap settings we were altering per-object in the painter classes.

We already had a reset method for graphics contexts in the Resource
module, so I've made that responsible for the guts of setting those
properties how they should be at the start of painting for a given
object to the graphics context.