The variance of divisor sums in arithmetic progressions