PBM decoding now produces a paletted image.

This reduces a pbm -> png conversion with testdata pbm images from 56kB to 36kB (36% size reduction). If image/png is optimized for 1-bit colormaps, there'll be an additional free reduction to 28kB (50% size reduction from the original grayscale).