Permissions UI

Among other things, fixes #482 and #450.
I don't think so, because ```lib/documents``` is where model is defined. ```ACCESS``` should go there because it's a constant used in the model. ```ROLES``` however is a constant only used in logics, but never as a value stored in the model itself, so that's why I'm fine that it's simply in ```lib```. Of course if one day you started storing the role into the model in this way, I'd move it there. So it's a gray area and I'm also not opposed to storing it in ```lib/documents/lib/document.coffee```. Your call.