Make patch_to_diff use lists instead of string concatenation
String concatenation is *very* inefficient in Python (and most languages) due to
the constant reallocation of the same memory block.
Instead, let's just build up the full diff in a list of strings, which we then
concatenate in a single time.
On my laptop, this speeds up the viewing of a particular semi-large diff from
over three minutes to just two seconds.
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>