Reduce memory consumption for text visual with styles and emoji
Measured using memps on target by creating 500 TextLabels, and memory
is reduced by 60% in the best case and by 25% in the worst case.
For example:
TextLabel with single color text and styles:
Before applying this patch:
S(CODE) S(DATA) P(CODE) P(DATA) PEAK PSS 3D
12996 236 20 275620 289148 278088 270824
After applying this patch:
S(CODE) S(DATA) P(CODE) P(DATA) PEAK PSS 3D
13204 236 16 126852 140308 129395 114728
TextLabel with multiple text colors (by enabling markup):
Before applying this patch:
S(CODE) S(DATA) P(CODE) P(DATA) PEAK PSS 3D
13204 236 20 275512 289064 278840 270824
After applying this patch:
S(CODE) S(DATA) P(CODE) P(DATA) PEAK PSS 3D
13204 236 16 99388 112844 102713 90696
Change-Id: I533122b647678dc9888a1f4b94efd59336e2bfdb