Change global gitignore file

Add *.xml.old
Fix Code Contract issues

Fix Code Contract issue with using private variables in pre-conditions
Also small cosmetic changes regarding new ReSharper configuration