ENH Support saving 16 bit PNG images

The only tricky bit is saving in the right endiness. For supporting
this, this commit also adds a memory pool object which frees the whole
pool when its destructor is called.
Merge pull request #1 from luispedro/master

ENH Support saving 16 bit PNG images