What does "invariant to bias and gain changes" mean?
You need to be careful when reproducing formulas! Your $i_r$, $i_w$ are actually $\bar{i_r}$, $\bar{i_w}$ in the paper and two sentences above $(4)$, it says these are


  their zero-mean versions, which are
  obtained by subtracting from each vector its corresponding
  arithmetic mean.


So, the symbols in your formula are always the same, regardless of whether there is a constant value added to them (that's the definition of bias), because that would automatically shift the arithmetic mean by the same amount.

The division by the individual vector's norm also "undos" any multiplication with a scalar (that's the definition of gain).

So, the overall formula is unchanged (that's what invariant means) when you add a bias to the vectors, and unchanged when you apply gain to the vectors.