Fixed decoding of RGB PNGs

This changes code in both xlib and shared with win32, so it's possible
that this broke something on that side as well.  I'm certain that the
corrections made to png.c are correct though.