FIX: Bookmark topics were not being updated when the post moved (PR #12542)

Because bookmarks have both topic and post ID, when the post was moved into another topic the bookmark was still attached to the post but did not show in the UI. This PR makes it so the all topic IDs for bookmarks attached to a post are updated when a post is moved.

Also included is a migration to fix affected records (e.g. on Meta there are 20 affected records).

GitHub

what do you think about moving that to post_migrate?

Oh right I always forget that things like this should go there, cause stuff can still mess up while deploying. Will move it

This pull request has been mentioned on Discourse Meta. There might be relevant details there: