Abelian groups whose endomorphism ring is linearly compact