[WIP] Optimization of operators list

The patch:
- Moves optimization code from the evaluator;
- Pattern based search;
- Groups "print by char" content into beginText/endText blocks #4316;
- Caches images decoding (by resource name or checksum);
- Groups small images into repeat image draw operations #4271.