jinja : reduce template rendering overhead (#32023)
* jinja : reduce value allocation and lookup overhead
Assisted-by: GPT-6 Astra
* jinja : address rendering review feedback
Assisted-by: GPT-6 Astra
* jinja : test multipart strings and simplify lookup
Assisted-by: GPT-6 Astra
* fix "undefined hint"
* fix divisibleby 0
* clean up
---------
Co-authored-by: Xuan Son Nguyen <son@huggingface.co>