XWIKI-9527: Sheets are not applied on preview action if the document is new
* Add functional test.
* Move preview test from Selenium 1 to Selenium 2.
(cherry picked from commit 34363ddf40422597326dfa5435af2406aeb6166f)