[Core] optimize preUpdate and perPersist-Hooks for Application and Abstract
(#5301)