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) );
`0.0`
Should result in `5.1666`

And:
> A := [1,2,3,4];
> WriteLn( AverageExtended(A) );
`2.21336`
Where it should result in `2.5`
Merge pull request #306 from WarPie/master

bugfix: AverageExtended