XWIKI-11438: Use document name for 'Title' fields when document title is empty

* Fallback on doc.name
* Thanks Eduard for the solution

(cherry picked from commit 3d4907fa61021c3d771b0607b8d56e496b615e95)