[feature/api] Start with permission control

The auth function in the api auth class now returns the user_id if
the API is enabled and the user can access the API (and the hash
is valid if the user is not a guest).

The forum API now checks if the user has read permission for the forums.

PHPBB3-11595