XWIKI-8839: XWikiDocument.getXObject(EntityReference classReference, int nb) ignores the object number and always returns the first object
* add tests
(cherry picked from commit 234b609a7942165748b169f50ac84e6c204ac120)