*: use types.Hash to refer to images

This makes the interface to stage0 a bit more robust.
debugging?