Clip source bounds to the minimum of src and mask, for the case
where src is an *image.Uniform.
LGTM=nigeltao
R=nigeltao
CC=golang-codereviews
https://golang.org/cl/167310044
Also, modify the affine test to share the test
image with the glimage test.
LGTM=nigeltao
R=nigeltao
CC=golang-codereviews
https://golang.org/cl/164400043
This code is an import from my long-defunct graphics
library, code.google.com/p/graphics-go. It was
reviewed by nigeltao back in the day.
LGTM=nigeltao
R=nigeltao
CC=golang-codereviews
https://golang.org/cl/142520043