First item: Convert diffitem to unsigned type
Currently diffcode, in DIFFCODE (Src/DiffItem.h) is defined as int. That is a bit wasteful as diffcode is a set of flags.
Second item: use DIFFCODE struct when handling diffcodes
Lots of code just uses diffcode as an int value. Which limits our possibilities to enchange/alter DIFFCODE definition.