Turn BlobLinePermalinkUpdater into a renderless Vue component

The following discussion from !181901 (merged) should be addressed:

  • @markrian started a discussion:

    issue: This function doesn't clean up after itself.

    It's being treated like a class, as we new it in app/assets/javascripts/repository/components/header_area/permalink_dropdown_item.vue. I see we new it elsewhere in the code base as well.

    No need to fix that in this MR, but I think it's worth addressing this in a follow up (issue or straight to MR).

    Possible approaches:

    • Make BlobLinePermalinkUpdater actually a class, with state, and a destroy method that can be called at the right time by the caller.
    • Turn BlobLinePermalinkUpdater into a renderless Vue component, which does its own clean up.
    • Return a clean up function from BlobLinePermalinkUpdater, and update callers to call that when appropriate.