Clean up code a bit

https://bugzilla.gnome.org/show_bug.cgi?id=720886
Document the usage of each code block

https://bugzilla.gnome.org/show_bug.cgi?id=720886
Put related styles together

https://bugzilla.gnome.org/show_bug.cgi?id=720886
Tidy the css styles a bit

https://bugzilla.gnome.org/show_bug.cgi?id=720886
Extract to 'exec_template' function

https://bugzilla.gnome.org/show_bug.cgi?id=720886
Extract to 'diff_hunk()' function

https://bugzilla.gnome.org/show_bug.cgi?id=720886
Move the wrapped html into template

https://bugzilla.gnome.org/show_bug.cgi?id=720886
Replace 'FILE_BODY' at the end

It rarely happens, if 'FILE_BODY' contains placeholders, it has to be
the last placeholder to be replaced.

https://bugzilla.gnome.org/show_bug.cgi?id=720886