png-load: Move function for opening stream to library

In order to be able to reuse it in the other file loaders,
like gegl:jpg-load.
In private header for now.