3.0 countercache

ref #4797 

This fixes the counter cache not being updated when the belongsTo association field is modified.
It introduces a `_oldProperties` to Entities and allow to freeze all properties value when saving.

Should not return by reference, you don't want old properties to be modified