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.