[feature/api] Added function to reply to a thread

Implemented topic reply. Re-organized to shared code between new
topic and reply to avoid code duplication.

TODO:
* Validation, both data and auth
* Consider moving to JSON instead of postdata

PHPBB3-11595