[Refactoring] Gather all toCBuffer functions into PrettyPrintVisitor

This is the basis for further improvements.