simplify handling of highlighted segments and handle ones which span
lines
convert C++ exception from Indri into a Lua error
handle the Lua error in indri_query instead of crashing
allow navigation to next/prev pages when item selection passes end