[feature/api] Changes to authorization flow

Changes to the initial authorization flow. Instead of
allowing the application to chose whatever auth
and sign key as wanted, now the API will generate
3 keys: an exchange key, an auth key and a sign key.
The application is only given the exchange key to start,
and the user uses this key to authorize the application.
The application can then exchange this key for the
auth key and sign key.

This was done to increase the security of the user.

PHPBB3-11595