Gauge-invariant variations in the redshift and cosmic background radiation anisotropies