Improve destroying elements of SkTArray

It turns out that 80% of all SkTArray are empty. The current code
is not optimized for zero arrays, and do a lot of up front work
just to not do anything.

The new code optimizes the empty case, and improves loop
performance.

Bug: b/260713649
Change-Id: Ia9a2a7d5a0db82e0dae902daec783ae93f417928
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/612637
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Herb Derby <herb@google.com>
1 file changed