Improvements to the Filter
1) Last filter is saved in memory
2) More intuitive behavior for application of successive filters
3) Cancel and closing filter window behave correctly
These changes required me to add a new variable 'metadata_unique_fields'
to myhandles that contains the unique values taken by each metadata field. The
filter now operates on the metadata rather than grouped metadata, and special
checks are in place for the number of foreground blocks field.