Quasilinear elliptic equations with critical potentials