gfilter.R: improve behavior of prev/next buttons

Improve behavior of prev/next buttons in gfilter.R for the SingleChoice filter: catch when selection is invalid and disable buttons. Switch the display order of prev/next buttons. Some minor tweaks to seq_sane.