XWIKI-9887: When changing the owner of a wiki, wiki owner security access rights are not updated

(Cherry-picked from commits ea5cb728f0efa61056a71838ffad55b568873296 and ce86da3c757d45a771813621328e1aa2a6e40b02 on master)