Add inventory identifications to inventory clicks event

I'm sorry, I got extremely annoyed with trying to read all the nonsense.
I added a TODO to make the event smarter... Eventually I'll do that, and
hopefully store some static variables in the file so we don't have a
wall of freaking possibilities that's almost impossible to read
Make armor event cancellations update the player's inventory correctly

Also fix possible NPE and random unfixed scrap from my last commit.
Make properties pattern available to external dObjects
Merge pull request #868 from Morphan1/master

Inventory-related fixes