issue #7155 - fre is slow. first pass at using temp table to (1) reduce the amount of data to wade through and (2) reduce the complexity of the filtering criteria. initial testing shows runtime reduction in a simple db from 20-30 sec down to 2-9 sec for a set of reports; add a simple test, too.
respond to review comments
Merge pull request #1575 from gilmoskowitz/7155

issue #7155 - speed up the FRE