Backported a change from 0.9 whereby the iteration of a hierarchy
of mappers used in polymorphic inheritance loads is sorted on class name,
which allows the SELECT statements generated for polymorphic queries
to have deterministic rendering, which in turn helps with caching
schemes that cache on the SQL string itself.
[ticket:2779]