Implement result sets

Add machinery to keep track of which specific search caused us to get a
result. Add and hook up UI to select such result sets. This makes
searching much more sane in the presence of large prior result sets
and/or exploratory results, by allowing the user to review only the
results relevant to a specific search, while still keeping the total set
of results around for later perusal.
Move 'discard' button

Move the 'discard' button to the very end of the I/O tool bar. The new
result set selector was adjacent to its old location, and also hidden
with the initial window size, which made it easy to accidentally click
the 'discard' button when aiming for the result set selector (or the
'this tool bar has more items' arrow).

The original motivation for wanting it first was largely due to an
expectation that the save location combo box would resize to contents,
and that having it on the right would tend to cause it to move around as
the save location combo box's resize hint changed. However, the save
location combo box is filling available space, so this is not an issue.