Add generic onUpdate method to Item class

This includes the changes from my other PR (#1039) because it's more likely to be accepted, and sooner, not to mention I made them for the same reason. I thought it'd make sense to do it this way, so I wouldn't have to update this one in case the other one gets accepted.

Either way, this is more of a suggestion than a request. I'm wondering if this would be a good idea and if anyone had any ideas to improve this. It's meant for a general-purpose tick method for items, expandable to mods. Additional equipment slots could be supported. Mods that allow holding multiple items at once, or increase hotbar / inventory size. Bags and backpacks could have items update inside of them.

The current suggestion makes use of a new class ```StackOrigin```, which holds information about where the ItemStack that's being updated is located, and allows replacing it with a different stack, or removing it completely. The implementation is far from perfect, it's just meant to be some proof-of-concept code.