Incrementally increase the index size based on when the data structures are allocated.

This should prevent crashes when we attempt to cleanup the codec when an image
fails to properly decode in tiled mode.

bug: 17433945
bug: 19507636

(cherry picked from commit 8594e1a8521b2cbdd941719b929b15ba943b1d4a)

Change-Id: I1b0c36905052294f28ebbf782bd93786f1c942c8
1 file changed