Sharing page: overlay with description about what a role can do

This Pull-Requests adds an overlay to the sharing page.
When the user clicks on a role, an overlay is displayed showing which action groups and transitions the user is allowed for which status.

Example:
![screenshot-sharing-overlay](https://cloud.githubusercontent.com/assets/7469/2876729/c52eabc0-d43b-11e3-9f53-282940d8bc7a.png)

The overlay is registered with JavaScript only, without template customizations, so that it plays nicely with other products customizing the sharing, such as `ftw.permissionmanager`.

The pull-request also includes some refactorings.

@maethu @deiferni 
/cc @phabegger