Improve markup substitution in HelpWriterContext.
- substituteMarkup() replaced with an interface that also does line
wrapping at the same time. Allows more complex line wrapping that
can also depend on the input markup, and clarifies responsibilities in
the code.
- Make TextTableFormatter use the new interface, removing explicit
substituteMarkup() calls from elsewhere in the code.
- Structure the substitution to allow easy addition of more output
formats.
Related to #685 and #969.
Change-Id: Id34be9489aa3a90d94cd87f8936b030bc21f1c98