HHH-8129 - Unify BaseQueryImpl and AbstractQueryImpl hierarchies