XWIKI-9945: One bad document title can prevent Solr from indexing other documents
* Prevent infinite recursion by keeping a stack of documents whose titles are currently being displayed (on the current execution context).
* Also, make sure we pop the document from context only if the push is successful, otherwise we'll end up with an Execution with no ExecutionContext, which will cause lots of NPE for components that want to access the XWiki context from the ExecutionContext.

(cherry picked from commit 387275f3d78a32366f0b4dd9f6e52ca3dfdbe116)