16 bit PGM support. 

* Read and write support for 16 bit depth PGM images. Fixes #602.
* Should work with 32 bit pgm, should they actually exist. Even if they don't, I'd leave read support in.