Move `chomp` function into its own util file
Add pretty-printing capability for TR types

  - Internally convert types to s-expressions before printing
  - Pretty print based on s-expression representation
Use type pretty-printing in TR messages

Closes PR 11271
Add type printer tests