Made the crafting recipe search case-insensitive.
Made the list-items search case-insensitive.
Add sort by damage to adv. inventory,

Fix bug with usage of item::tname.
Use NUM_SORTBY instead of hardcoded value.
Reduce NUM_SORTBY for number of sort algorithms (sortnames).
Move the check for hotkey of ground items up.

The default key bindings for actions like UP/DOWN/LEFT/RIGHT contain the numbers on the numpad.
In the inventory screen they are used for moving the cursor, but if the item list contains items on the ground, those items have them as hotkey.
Before this: pressing '2' would move the cursor an item down, now pressing '2' selects the item with the hotkey '2'.