Improve performance of Pass fail hotspots

The JOIN query was doing a full table scan on a half million rows, thus making the query execute in about 3.5 seconds.  This query has to be executed for each metric on the scan report, so it was taking over 10 seconds to load the page.

After the change, it only has to look at a MUCH smaller set (10 rows compared to 450k in one example case)