Cake 2.4 behaviour callback compatibility fixes.

It fixes beforeSave, afterSave and beforeValidate callbacks compatibility warnings.