Refactor rst parsing for console output
Move code from helpwritercontext.cpp into a separate class in
rstparser.*, and structure it more cleanly. The logic is mostly the
same as earlier, but the new structure also makes it easier to fix
some issues. In particular, since the code now first identifies what
the next paragraph is, and uses a separate loop to format it, it is much
easier to adapt the formatting to the contents of the paragraph.
Add comments for the complicated paragraph parsing logic.
To support this change, make TextLineWrapper not produce whitespace-only
lines if requested to indent an empty line.
Add tests for fixed/enhanced functionality.
Change-Id: I690dcf1578780d5fb0016d41da1e67dca96bd08c