Reject blank order_values within #columns_for_distinct, as the orders aren't used at all on non-postgres adapters.
Move the except(:select) inside the construct_limited_ids_condition method to pair it closely with its motivation.
Simplify conditions within apply_join_dependency
Pull the excepts into apply_join_dependency, for the sake of DRY.
DRY-up join dependency creation by extracting construct_join_depdency
In #apply_join_dependency, we can apply the #where in-place because relation is always a new object.

Thanks to the #except we call at the top of the method.
Extract JoinDependency#join_relation to DRY the repeated application of the #join_associations.
Merge pull request #10558 from Empact/cleanup-finder-methods

Cleanup finder methods