Rewrite .transform.flip().

The previous version only seemed to work when alpha was 0 or 1, and
required use of a renderer. This version just does the flip directly,
copying the pixel values without changing them.