[REFACTOR] extract attributes behaviour into Attributes module.

- also moved from_json to rest_actions file
new attribute setter.
cleaner api for configuring resource host and path