Value type

Add full support for value-types.

Scrutinizer will probably complain a bit about methods complexity, I'll (hopefully) fix that tomorrow.
the extra attribute.  If resources of type bar may have an attribute foo  we want to be sure that the datamodel keep this attribute if it is present. So that AbstractNode.from_dict(d).as_dict() has the attribute foo is d has.