Potential dependence of polaron and bipolaron densities in conducting polymers: theoretical description beyond the Nernst equations