[RF] Fix copy-paste error in RooAddModel constructor and modernization
[RF] Fix copy-paste error in RooAddModel constructor and modernization

* replace wrong `dynamic_cast<RooAbsReal*>` with
  `dynamic_cast<RooAbsPdf*>` (presumably a copy-paste error)

* use `TIter` and range-based loop instead of `TIterator*`

* avoid C-style casts

* replace `assert(0)` with `std::runtime_error`, as asserts only work in
  debug buils

* replace one orrurence of `coef->GetName()` with `pdf->GetName()`,
  which was probably also a copy-paste error

This fixes the following warning in gcc11:

```
../roofit/roofitcore/src/RooAddModel.cxx: In constructor ‘RooAddModel::RooAddModel(const char*, const char*, const RooArgList&, const RooArgList&, Bool_t)’:
../roofit/roofitcore/src/RooAddModel.cxx:125:106: warning: ‘this’ pointer is null [-Wnonnull]
  125 |       coutE(InputArguments) << "RooAddModel::RooAddModel(" << GetName() << ") pdf " << pdf->GetName() << " is not of type RooAbsPdf, ignored" << endl ;
```

olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root