SugarJS: Generic Arrays

Generic types now flow through array methods.
Removed definitions for indexOf, lastIndexOf, reduce & reduceRight as
lib.d.ts already defines them and sugar does not add anything.
Added tests for arrays.
Fixed encoding in tests.