[feature/api] Restructure and cleanup

Moved the controllers, exceptions and repos to its own
namespace under /phpbb/api.

Split routing up in separate files with prefixes.

Made some functions clearer and cleaned up some code.

PHPBB3-11595