yaml callback: use new util introduced in ansible-core 2.19.0b2 (#10242)
* Avoid repeating some code.
* Use new utility added for ansible-core 2.19.0b2.
* Lint.
* Add changelog fragment.
* transform_to_native_types() does not convert map keys.
To catch all tagged strings, we have to recursively walk the data structure then.
* Add test with vaulted string.
(cherry picked from commit 66cb9aefb5)
* Do not remove non-ASCII Unicode from multi-line string output.
* Added basic tests.
* Add Unicode test.
* Simplify tests, avoid later Jinja features.
* Refactor.
* Make use diy tests use callback test framework as well.
* Remove color codes.
* Work around stable-2.9 bug.
* Simplify again.