Fix potential memory leak in SparseWeakArray

When compacting the array, one needs to reset the array positions that
have been moved to null.

Bug: 157444995
Test: N/A
Change-Id: I5ab17b378c318a07652291d55a600c697f097e67
(cherry picked from commit 131ce7ff651d652a77e822d0cb0b67cb2a8a1754)
1 file changed