added before and after save events to base model's save function, fixes #27