Updated documentation examples for attributes and Metadata

This provides fixes to documentation for various metadata usage examples
as well as detailed examples of usage for Resource attributes.