feat(platform): add ToPermissions method to user resource mapping
The ToPermissions method returns a set of permissions that is granted
via a user resource mapping.
feat(bolt): resolve sessions permissions on lookup
feat(http): use authorizer instead of authorization service for write api
feat(bolt): create user resource mappings for org users in bucket create
feat(bolt): create user resource mapping for first org/user
fix(platform): use authorizer for query endpoint instead of authorization
test(http): use cmp instead of reflect for decode test
This iterface is supposed to be something that both sessions and
authorizations can share so that other components can authorize requests
as they see fit.
Since all paths for the various query services were the same even though
the API was different it was confusing to work with and debug.
Now all internal paths have a unique name.