om: start using new filtering formatter in types formatter

- copy across utility from C++ formatters, and refactor it a bit to
  fit OM
- remove C++ formatter's indenter and use the filtering formatter
  instead. We still need more work on this but the basics are there.