Move all the item-processing into the item class.

This combines the item processing done for items on the map and for items that are in the players inventory.