[ticket/12718] Use remove_topic_from_statistic() for delete_topic

PHPBB3-12718
[ticket/12718] Update docblock

PHPBB3-12718
[ticket/12718] Add tests to check user_posts on post deletion

PHPBB3-12718
[ticket/12718] Fix docblocks

PHPBB3-12718
[ticket/12718] Fix spacing and type casting

PHPBB3-12718
[ticket/12718] Use a separate variable for sql query

PHPBB3-12718
Merge pull request #2624 from dhruvgoel92/ticket/12718

[ticket/12718] Use remove_topic_from_statistic() for delete_topic

* dhruvgoel92/ticket/12718:
  [ticket/12718] Use a separate variable for sql query
  [ticket/12718] Fix spacing and type casting
  [ticket/12718] Fix docblocks
  [ticket/12718] Add tests to check user_posts on post deletion
  [ticket/12718] Update docblock
  [ticket/12718] Use remove_topic_from_statistic() for delete_topic