XWIKI-9738: Finalize migration from workspaces to the new wiki API.

* Fix the build.
* Handle the case where workspacetemplate does not have the workspace object in the descriptor.
Merge pull request #236 from gdelhumeau/XWIKI-9738

XWIKI-9738: Finalize migration from workspaces to the new wiki API.