Add add/remove profile methods on Container to avoid code duplication.
Fix a possible NPE.
[FABRIC-481] Prevent deletion of a profile that is associated with containers. Add option to automatically remove a "to be deleted profile" from all associated containers.