Implement a method `transform_rect` that transforms a rectangle and returns its bounding rect.

Because it returns the bounding rect, this is well-defined for rotations
and skew. This is useful for creating temporary draw targets.

r? @glennw
Shouldn't this be max_x, origin.y? Or am I misreading how the rect is defined? Ascii art?