XWIKI-8801: DefaultVelocityManager's getVelocityEngine() method seems to be taking too long to execute
* Trying to move the synchronization only where needed