[xbuild] Implement ItemDefinitionGroup

I fixed some test, that failed under wine + .NET 3.5 and 4.0, some test that failed becouse of my locale (decimal comma).
Then adopt old Haakon Sporsheims patch with ItemDefinitionGroup.