Rewrote command line help writer.
- Rewrote printing code for options using TextTableFormatter. Should now
produce at least as good output as the old code invoked by
parse_common_args() while keeping most of the layout, and in some
cases does significantly better (partly because of the item below).
- Split selection options into a separate table with its own formatting
to make more space for long values that they typically have.
- Added test code that exercises different parts of the formatting code
and allows one to easily see the output (with -stdout cmd-line
parameter to the test executable). Without the -stdout parameter,
each test is marked as failed if anything in the output changes,
allowing them to work as regression tests.
- Added line wrapping for descriptions.
- Markup substitution ([TT], [PAR] etc.) is not yet done. Will add that
separately, since it requires changes to the line wrapping code to
strip some whitespace...
There are some TODOs in the code, but they mostly concern better
handling of corner or more complex cases.
IssueID #666
Change-Id: I538fbaac27572a518d24dff7b0f30f8746a540af