Escape leading spaces and tabs in markdown processing.

When escaping plain text as markdown, we need to handle leading spaces (four or
more) and leading tabs, as these blocks are considered to be code samples. This
meant that some basic syntax highlighting would be applied (often erroneously),
and that URLs were not properly linked.

After experimenting for quite some time with escaping the first tab or space, I
gave up on that approach. Markdown renderers do not handle escaped spaces well.
The solution that I settled on was to replace the first space with a
non-breaking space entity (for leading spaces), and prepend the line with an
nbsp (for leading tabs). This renders correctly while still allowing us to
escape and unescape.

Testing done:
- Reproduced the bug (using `--description="$(git log -n 1 in `rbt post`) and
  saw that it indented the commit message without treating it as a code block.
- Used the API with `?force-text-type=plain` to verify unescaping of the nbsp
  entities.
- Ran unit tests.

Fixes bug 3503.

Reviewed at https://reviews.reviewboard.org/r/6200/
Merge branch 'release-2.0.x'
Improve progress reporting in condensediffs.

condensediffs now shows more information on the progress of the
conversion of diffs. Along with the existing percentage, it will also
now show the number of processed items, how many there are total, and
the estimated time to completion.

Since the estimated time to completion is based on the average time
taken per item, and the number of items, the estimate becomes more
accurate over time. Instead of showing some useless numbers up-front, we
wait 30 seconds until we show the estimate. From my testing, this
appears to be a a good number, as the estimate settled around that point
in the databases I used.

This helps give administrators an idea as to how long the operation will
take, which is useful for knowing whether to keep it going or to abort
and finish later.
Merge branch 'release-2.0.x'