[ticket/11528] Move related code from functions_posting to function

Move related code from functions_posting to
remove_post_from_statistic() in content_visibility.php

https://tracker.phpbb.com/browse/PHPBB3-12738
PHPBB3-11528
content_visibility is a service, use the constructor to inject the config service and use it