font/plan9font: optimize the conversion to image.Alpha.

Also remove the dependency on the image/draw package. That package will
give the right answer for arbitrary source images, including those of
type plan9Image, but doing the conversion directly avoids bouncing uint8
or color.Alpha values through the general-purpose draw.Image,
image.Image and color.Color interfaces.

It is possible to optimize this even further, but this will do for now.

benchmark                   old ns/op     new ns/op     delta
BenchmarkParseSubfont-8     2298492       492443        -78.58%

Change-Id: Iea9436bffa097a1ba0052dbabf21516bce8b61e0
Reviewed-on: https://go-review.googlesource.com/21693
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2 files changed