XWIKI-9527: Sheets are not applied on preview action if the document is new
* Split EditAction#render() in multiple methods to be able to reuse them and also to make the code more clear.
* Rafactor the PreviewAction to extend the EditAction: both actions should do the same thing, expect the preview should render in view mode, but the preparation of the edited/previewed document is the same.