Add some bulletproofing to advanced inventory index handling, fixes various ways that the selection could be on an invalid item.
Also, treat paging like up and down when in category selection mode.
(Mostly detected by -D_GLIBCXX_DEBUG)
Rewrite game::display_slice to use input context

Made item cursor wrap around end of list work.
Removed inventory::subset as it was used only by inventory_ui and is not needed anymore
Use extended features of input_context in inventory_ui.cpp
inventory_ui enhancements:

Made separate item lists for main inventory and worn/wielded items.
Allow separate scrolling/moving/selecting in both list.
Handle input of invlets before actions to allow the default actions bindings to overlay with invlets
Merge remote-tracking branches 'dda/pr/7595' and 'dda/pr/7613' into dda-master

* dda/pr/7595:
  Add some bulletproofing to advanced inventory index handling, fixes various ways that the selection could be on an invalid item. Also, treat paging like up and down when in category selection mode. (Mostly detected by -D_GLIBCXX_DEBUG)

* dda/pr/7613:
  Handle input of invlets before actions to allow the default actions bindings to overlay with invlets
  inventory_ui enhancements:
  Rewrite game::display_slice to use input context
Restyle after merge.