XWIKI-10998: After a user deletes his avatar, "User Avatar" is not correctly displayed
- Added tests to preserve previous coverage.

(cherry picked from commit eccc7f55a6788bdb4f9f40bb57546c3da5ac4576)