[ticket/11731] Remove all static calls and use phpbb_container

PHPBB3-11731