Delete edge if container was deleted.
Delete edge with container.
Merge branch 'Elements' of https://github.com/IrinaShkviro/qreal
refactored a little bit