Formprotection persistToken method is called too often, causing unnecessary DB-load
To asure that in all cases the tokens get persisted, I added the persistToken call way too often
Remove most of the calls and add one in template->endPage instead, since this is a central exit point for all modules.
Thanks for Steffen Kamper for the idea.
Note: A few places are left, where the template object is not used, thus the persist method needs to be called there.
(issue imported from #M17284)