[ticket/12718] Use remove_topic_from_statistic() for delete_topic

https://tracker.phpbb.com/browse/PHPBB3-12718
https://tracker.phpbb.com/browse/PHPBB3-12737
PHPBB3-12718
PHPBB3-12737
Woah! all other queries before this one dont use a var, should I change them too? :P