Safety analyses with uncertainty quantification for fusion and fission nuclear power plants. Applications to EU DEMO fusion reactor and BWRs