alsamixer: fix segfault in display_controls() with out-of-range index
Switching to a view that has no controls (e.g. the Capture view on a
device without any capture controls) and pressing an arrow key could
leave focus_control_index and, in turn, the static
first_visible_control_index at -1.
Reorder the focus clamp so the lower bound is applied last and cast
controls_count to int, and add a lower-bound clamp (plus a signed cast)
for first_visible_control_index in display_controls().
Closes: https://github.com/alsa-project/alsa-utils/issues/335 Signed-off-by: Jaroslav Kysela <perex@perex.cz>