Performance improvements to HqlQueryBuilder to use several idset clauses rather than consolidating them into a single large clause.