RoomSettings: refactor permissions calculations
RoomSettings: refactor permissions calculations

The logic for calculating who had permission for what was impenetrable (and
wrong, in parts), so rewrite it to be a bit clearer.

aperezdc/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk