Test robustness: Ignore changes to whitespace in markdown output

Different versions of python-markdown produce different whitespace.  This
defeats my naive tests which just do a diff.  This commit makes diff
ignore whitespace changes to prevent the tests breaking for no reason in
the future.

Unfortunately, even with diff flags `-B` and `-u` diff still can't cope
with an addition of a newline in the middle of some text so I've had to
make a change to the expected output of the `test_diff` test.  A fix for
this would be to normalise the expected output and the markdown output for
instance with html tidy before doing the file compare or using wdiff for a
word-based diff independent of newlines but both approaches would require
additional dependencies and are probably not worth it.
markdown extension: Support markdown >v2.1.0

From the python-markdown v2.1.0 release notes[1]:

> * Some code was moved into the markdown.util namespace which was
>   previously in the markdown namespace. Extension authors may need to
>   adjust a few import statements in their extensions to work with the
>   changes.

With this commit patch-tutorial should support python markdown before and
after v2.1.0.

[1]: http://pythonhosted.org/Markdown/release-2.1.0.html
markdown extension: support v2.3.1

make-patch-tutorial was failing to run on markdown v2.3.1 with the error:

    Traceback (most recent call last):
      File "../../generate-patch-tutorial.py", line 216, in <module>
        sys.exit(main(sys.argv))
      File "../../generate-patch-tutorial.py", line 211, in main
        generate_html(output, abspatches, options.decorate, options.initial_dir)
      File "../../generate-patch-tutorial.py", line 186, in generate_html
        output.write(markdown.markdown(comment, ["showpatch"]))
      File "/usr/lib/python2.7/dist-packages/markdown/__init__.py", line 412, in markdown
        return md.convert(text)
      File "/usr/lib/python2.7/dist-packages/markdown/__init__.py", line 296, in convert
        newRoot = treeprocessor.run(root)
      File "/usr/lib/python2.7/dist-packages/markdown/treeprocessors.py", line 360, in run
        pre[0].text = pre[0].text.rstrip() + '\n'
    AttributeError: 'NoneType' object has no attribute 'rstrip'

This patch fixes this issue which could be found by running the automated
tests.  I don't know exactly which version of markdown introduced this
change but this commit makes it work with v2.3.1.
Improve test runner output