Simplification: Make namedRef implement distreference.Named
Simplification: Make namedRef implement distreference.Named

Instead of embedding a distreference.Named as a private field, embed it
as an anonymous field, making namedRef a valid distreference.Named
implementation.

This is EXTREMELY ugly.  In theory, docker/distribution/reference
should be able to work with any valid input implementing
distreference.Named() equally, based on only what the public method
implementations return.  In practice, the code expects specific
implementations of internal interfaces, and merely embeding a
distreference.Named into our struct makes our struct _not_ implement
these internal interfaces.  We are forced to explicitly define
forwarding methods, using an undocumented knowledge that the returned
distreference.Named implements them.

Soon enough we will completely eiliminate namedRef and use a
distreference.Named directly, and then distreference can keep playing
these ugly games without us having to care.

Signed-off-by: Miloslav Trmač <9c008e38982a5397deb855345fb164f0558459ae@redhat.com>

masters-of-cats/image,containers/image,containers/image