Partial fix for issue 1449: improve server-side referential integrity support.
Previous to this change referential integrity was only enforced when a referencing (aggregating) component was added or modified. The support did not prevent a referenced component from being disabled or deleted. This change adds this remaining support:
* a component cannot be deleted if it is referenced by one or more components
* a component cannot be disabled if it is referenced by one or more components (it is possible to restrict this constraint so that it only applies when the referencing component(s) are enabled)
This implementation only enforces referential integrity for referencing components which have listeners associated with them. For example, if component A references component B, then referential integrity will only be enforced automatically if component A has a change listener registered against it, or if it is "added" using an add listener that was registered against its parent. In effect, referential integrity is only enforced for components which are in use or are about to be used.