InputState: Fix build by using fabs() instead of abs()
Do proper leftover calculations when adding equipment to slots

ItemStorage's add() function will try to fill up all slots in the
storage area. This isn't what we want for equipment. Instead, any
overflow should be added to the player's regular inventory.

In MenuInventory:activate(), I simplified searching for valid slots.
It's now a single loop instead of two separate loops.
Merge pull request #1166 from dorkster/fixes

InputState: Fix build by using fabs() instead of abs()
Merge pull request #1167 from dorkster/menus

Do proper leftover calculations when adding equipment to slots