Doping dependence of semiconductor–metal transition in InP at high pressures