Groups of infinite rank whose subgroups are closed in the profinite topology