Fix: AverageExtended

This fixes the function used to compute the average of an extended-type
array, assuming it should do the same as AverageTIA, which computes the
mean.

Proof that it's broken:
> A := [5,5,0,5,9,7];
> WriteLn( AverageExtended(A) );

Gives `0.0` where it should result in `5.1666`

And:
> A := [1,2,3,4];
> WriteLn( AverageExtended(A) );

Gives `2.21336` where it should result in `2.5`