Fix sparse array handling in `EventEmitter#listeners()` (#24546)
Fix sparse array handling in `EventEmitter#listeners()` (#24546)

Summary:
Fixes a regression in https://github.com/facebook/react-native/commit/1f8b46a2fc191e2899735fbdcdbb535a91b63724. The internal subscription vendor uses a sparse array to track listeners, which makes listener removal fast. When querying listeners, the sparse entries need to be removed. `Array#filter` is a built-in way to do this -> linked to the JS spec, which explains this.

[General] [Fixed] - Fixed sparse array handling in `EventEmitter#listeners()`
Pull Request resolved: https://github.com/facebook/react-native/pull/24546

Differential Revision: D15044790

Pulled By: cpojer

fbshipit-source-id: 0f1301618739357b4a0f5378b9584efe74f0f09a

javache/react-native,hammerandchisel/react-native,exponent/react-native,exponentjs/react-native,exponentjs/react-native,hammerandchisel/react-native,hoangpham95/react-native,pandiaraj44/react-native,hoangpham95/react-native,hammerandchisel/react-native,javache/react-native,myntra/react-native,hammerandchisel/react-native,myntra/react-native,exponent/react-native,janicduplessis/react-native,janicduplessis/react-native,javache/react-native,janicduplessis/react-native,pandiaraj44/react-native,javache/react-native,facebook/react-native,exponent/react-native,hoangpham95/react-native,pandiaraj44/react-native,javache/react-native,exponent/react-native,facebook/react-native,myntra/react-native,exponentjs/react-native,hoangpham95/react-native,myntra/react-native,myntra/react-native,pandiaraj44/react-native,facebook/react-native,pandiaraj44/react-native,myntra/react-native,exponent/react-native,facebook/react-native,facebook/react-native,facebook/react-native,facebook/react-native,exponent/react-native,exponent/react-native,arthuralee/react-native,arthuralee/react-native,exponent/react-native,pandiaraj44/react-native,facebook/react-native,exponentjs/react-native,javache/react-native,myntra/react-native,hammerandchisel/react-native,janicduplessis/react-native,hoangpham95/react-native,facebook/react-native,hammerandchisel/react-native,janicduplessis/react-native,janicduplessis/react-native,myntra/react-native,exponentjs/react-native,pandiaraj44/react-native,hammerandchisel/react-native,arthuralee/react-native,myntra/react-native,hoangpham95/react-native,javache/react-native,pandiaraj44/react-native,arthuralee/react-native,hammerandchisel/react-native,hoangpham95/react-native,hoangpham95/react-native,javache/react-native,exponentjs/react-native,janicduplessis/react-native,arthuralee/react-native,javache/react-native,exponentjs/react-native,exponentjs/react-native,janicduplessis/react-native