png-load: Refactor stream handling a bit

Required to avoid reading stream twice in process()
Also moves some things out to dedicated functions and adds
GError based error handling.
tests/compositions: Print exception if VERBOSE