gitstats: Add a diff memory to diff.py and use it in bug.py