Fix: take into account editability of relations
More general getEditableDeclaration

Doesn't work correctly yet for widened interface expressions, as the widened type is used for creating new atoms. It can be fixed by having the type checker return the narrowest possible type, or by computing the types in getEditableDeclaration.