Change Doc to trait to allow it to be used as a cake slice.

Change the implementation of retrieve() method.
Rename and privatize symbols in CommentFactoryBase to avoid clashes when cooking a cake.