[NTI] Allow using any IArrayLike object with function .apply.
[NTI] Allow using any IArrayLike object with function .apply.

Also, get better typing when using .apply with var_args functions, and fix a bug in type-checking of IArrayLike objects.

RELNOTES:n/a

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143696745

google/closure-library,lucidsoftware/closure-library,redforks/closure-library,lucidsoftware/closure-library,teppeis/closure-library,teppeis/closure-library,redforks/closure-library,platinumpixs/google-closure-library,teppeis/closure-library,lucidsoftware/closure-library,redforks/closure-library,google/closure-library,platinumpixs/google-closure-library,lucidsoftware/closure-library,ikabirov/closure-library,ikabirov/closure-library,google/closure-library,ikabirov/closure-library,teppeis/closure-library,ikabirov/closure-library,platinumpixs/google-closure-library,platinumpixs/google-closure-library,redforks/closure-library,google/closure-library,google/closure-library