Average charge states of heavy and superheavy ions passing through a rarified gas : Theory and experiment