Return wether an OC attribute has been defined or not.

def oc_attr_isdefault(o):
    """Return wether an OC attribute has been defined or not."""
    if not o._changed() and not o.default():
        return True
    if o == o.default():
        return True
    return False