Safe Online Dynamics Learning with Initially Unknown Models and Infeasible Safety Certificates