Move all device-independent stuff to the priv struct, which is now not
zlib-specific.