[ticket/12775] Add a container_factory class and remove functions_container

https://tracker.phpbb.com/browse/PHPBB3-12775
https://tracker.phpbb.com/browse/PHPBB3-12420
https://tracker.phpbb.com/browse/PHPBB3-12774

PHPBB3-12775
I assume we can easily remove this later on to also have the extensions loaded? This would fix https://tracker.phpbb.com/browse/PHPBB3-12685