schema: Fix optional Dependency.ImageID

Unmarshalling a json without a dependency's ImageID will create an empty Hash
struct. On Marshall it will call assertValid that will correctly fail.

This patch will not marshall ImageID if it's Empty.