Added helper invlet lookup method to speed up inventory operations.

This is far less intrusive and easier to use alternative to my earlier pull request #5997. It doesn't change existing API and its use is entirely optional for new code.

Currently it only contains one optimization for ```inventory::assign_empty_invlet```, but the effect is already very noticeable for me (during crafting, on item disassembly etc.). It is the most I could do without changing the API (i.e. making all cases of ```inventory::add_item``` used inside a loop maintain "used invlets" list is not possible without changing it).

Feedback and ideas are greatly appreciated.