Adding support for setting addon properties through attributes

This is the same as the current functionality that widgets enjoy, just
extracted out and shared with addons