Convert Smarty & domain token processing to use token processor
This is a subset of the changes in
https://github.com/civicrm/civicrm-core/pull/19550 that we should be able to resolve
& merge while addressing that takes longer. It still gets us the
benefit of adopting a preferred pattern
Note that some test changes exist around handling of subject -
the code now converts a new line to a space consistently. In addition
tests that rely on leakage have been altered as smarty does not leak with
this approach