Questions about autocorrelation, correlation, and randomness
1) g1 assumes that there is a non-zero mean and that always needs to be subtracted off for the correlation calc to make sense.  g2 assumes that the mean is zero. g2 is incorrect if the mean is not zero. 

2) the mean is taken over the whole sample because the autocorrelation calc has the underlying assumption that the process is stationary so the mean doesn't change during the process.

3) As the lag gets larger, then, if the process is stationary, then the autocorrelations should doe down approach zero. Note that there are "long memory" processes that don't have this characteristic but I don't think that they are
considered stationary processes. Someone feel free to correct me if I'm wrong about long memory processes not being considered stationary.