Sort the scanned Hibernate entities by name

When using AnnotationSessionFactoryBean.packagesToScan, the scan does
not find annotated classes in a specific or stable order. The order used
to add the classes to the configuration of the SessionFactory has a
direct impact on the SQL queries generated by Hibernate, so different
JVMs will generate queries that are equivalent but not equal:
 - It's impossible to get aggregated statistics across instances
 - It causes additional load for the database which has to parse
   different queries

This is fixed by sorting the classes by fully qualified name, which
provides a stable order across runs.

Issue: SPR-7742