Inventory changes

This mainly fix these two bugs:
https://bugs.openmw.org/issues/871
https://bugs.openmw.org/issues/399

[Related topic on the forum](https://forum.openmw.org/viewtopic.php?f=6&t=1861).