refactor(client): Simplify the error handling code.

* Rename `code` to `errno` to be consistent with the backend.
* Use a single hash called ERRORS for each namespace. The has contains both `errno` and `message`
* Extract `errors.js` from logic that was in `auth-errors.js`
* Extract `profile-errors.js` from logic in `profile-client.js`

fixes #1508