Relativistic mean-field theory with non-linear σ and ω terms for neutron stars and supernovae