XWIKI-10020: Only the last version is kept in wikistream instance output module if delete previous option is enabled

(cherry picked from commit 9f93eff359abb7915730ef95086636651f132293)