Rework the inventory letter(invlet) assignment system.

Instead of relying on item.invlet to store the preferred letter for an item, we now cache the preferred letter in the inventory.

This commit also fixes several locations in the code where inventory:additem should have been called with keep_invlet = true. This caused a bug where items would appear to have a different letter than they actually had, which only didn't happen often because items tended to keep their assigned invlet.
Implemented saving of preferred invlets.