Improve attributesForProperty: documentation

Actually explain how to use it and add an example.
Merge pull request #865 from realm/tg-docs

Improve attributesForProperty: documentation