Bit of cleanup and testing of alert->ack and alert->purge
Fix test that started failing after the change to remove JOIN FETCH
from Criteria calls that include paging and optional data.  It seems the
new approach changes slightly the way the data is returned.

loadDefinition() returns hibernate proxied data. It is not safe to pass
proxies into equals() impls because these typically access fields directly,
not through getters, and therefore bypass the proxied data.

Note that this change in behavior due to the JOIN FETCH fix would only
affect non-client code (like test code or intra-slsb calls) because return
values to client code would already be cleansed of the proxies.  The test
is fixed in the same way, by using HibernateDetachUtility to scrub the
proxies before attempting the assertEquals().
Add some translations
[BZ 965833 - Potential bug in join/fetch/avoidance code]
It is now possible to lazily fetch fields defined in super classes.

The avoidance of the join-fetch with limits exposed a missing feature that
was present in the code from the day one. It would be failing if the
criteria query was used to fetch a custom object (i.e. not the primary
persistent class of the criteria object) using an "altered projection" and
a fetch would be set on a field defined in a super class of the persistent
class of the criteria object. Only by chance this has never happened
before, because we don't use the altered projections on the criteria
queries that often.

Now that we lazily fetch fields much more often (to avoid join fetch
with limits) this is a problem even in cases without an altered projection.

The fix is fortunately very simple - we need to also search the
superclasses of the criteria's persistent class when looking for a field
to lazily fetch.

The possibility of fields being present in super-classes was taken into
account on other places in the CriteriaQueryGenerator class, too.

Documentation on the getJoinFetchFields() and alterProjection() was
enhanced to hopefully better explain the conditions underwhich you can
combine fetching and altered projection together.