Concentration-compactness principle at infinity and semilinear elliptic equations involving critical and subcritical Sobolev exponents