HHH-4150 - Fix and test

Conflicts:
	hibernate-core/src/main/antlr/hql.g
HHH-7608 - Fix and test

Conflicts:
	hibernate-core/src/test/java/org/hibernate/test/annotations/onetomany/OrderByTest.java