Unify connection attribute naming and fix double deletion request issue.

Different naming caused js to be incorrect preventing gui deletion of
connections. Double deletion occured because beforeDetach in contrast
to the after the fact handler is also triggered if we remove a element
programatically. Hence it has to have adequate logic for that case.