FIX: Decorate posts that are loaded after the initial render in post stream (PR #14600)

To clarify, this problem is not about the topic posts stream, it’s about posts streams like the user Activity one in the profile page (or in technical terms anything using the {{user-stream}} component).

Post decorations are currently applied inside a didInsertElement hook of the {{user-stream}} component. However, when the user scrolls the component will load more posts but these will be missing decorations because the didInsertElement is only fired once at the beginning of the component lifecycle.

This PR makes the component keep track of the last decorated post/DOM node, and when new posts are loaded the component fire an event for each new post and pass the post’s DOM node with the event. Our plugin API

(I noticed this problem when I was working on FIX: Apply post decorations to posts shown in the follow feed by OsamaSayegh · Pull Request #37 · discourse/discourse-follow · GitHub)

GitHub

    this._lastDecoratedElement = lastElement;

No need to use set if we never observe/compute it.