*: use types.Hash to refer to images

This makes the interface to stage0 a bit more robust.
Yeah, it was never exported to begin with....