Avoid duplication of code in BindingManagement.

Same code was called in resourceAdded and resourceRemoved method. It was extracted to a new method.