Record collection subsetting works now.

I haven't tested it very thoroughly, but the record collection
subsetting now works.  I've also plugged this into spreadsheet export
function, so selecting a bunch of records in a data grid and then
hitting the spreadsheet button now gets you just the selected records,
instead of all of them.