This infrastructure was added by commit 722408bcd1 and was only ever used for publications and subscriptions. Since we just bumped psql's minimum supported version to v10, it's no longer used by anything. Furthermore, a quick glance indicates there's nothing else that should use it. So, IMHO we might as well remove it.
Thanks for the patch!
Doing a grep on VersionedQuery I could find one instance missing in your patch in 010_tab_completion.pl file there's a test block