Safety-critical Policy Iteration Algorithm for Control under Model Uncertainty