svg: store image resources in the svg struct
This makes it consistent with xml resources. It also allows images to be cached in case they are rendered more than once. The images are loaded lazily during rendering which goes in the opposite direction with the goal of having an immutable Svg object, but at least this is the same of other resources. Beside images are just used in two places, and filters/images was already doing a hack to load the image at rendering time.