Apply dynamic properties to attributes

Dynamic properties haven't really proven useful, and they might make sense for model attributes. In this PR this change is also used in the relations mixin, where it simplifies the code. 

Lazy properties could also be useful when we don't want to instantiate a property until it is needed. This might speed up loading times in some cases.