beb38b0 Modify ModuleBuild._add_virtual_streams_filter to use a subquery to better support Postgres

Authored and Committed by mprahl 4 years ago
    Modify ModuleBuild._add_virtual_streams_filter to use a subquery to better support Postgres
    
    The old way performed a `DISTINCT (module_builds.id)` on the original query passed in
    to ModuleBuild._add_virtual_streams_filter, but this caused issues when the original
    query was ordered by something other than ID on Postgres databases. This new approach
    uses a subquery to filter that module builds with the desired virtual streams, and then
    joins this subquery to the original query.