writing guide information to layermetadata

Storing guide data in Guide layers and providing capabilities to
roundtrip from Guide layer to guide and back again.