fix unregiser of observer/observable

follow-up from #5334
@opdenkamp @ace20022 what happened here is that Observer::StopObserving interated through the vector of m_observables. But calling UnregisterObserver did change the vector. same for Observable. the solution is to make a copy of the vector first.