Add compile-time type checking for the ModelEvents
This change should be backward compatible so it could be backported to 2.5.x branch. Basically it add generics to most of the ModelEvents
methods so it would possible to create typesafe model listeners without ugly class casting.