XWIKI-9009: Cannot overwrite translation with WEB-INF/classes/ApplicationResources.properties anymore
* also fixed a potential resource leak
(cherry picked from commit 6a6c0d9bf56073a16e3abb2eb9f10b46ab9fd71e)