* lisp/progmodes/bug-reference.el (bug-reference-gitea-instances)
(bug-reference-gitlab-instances,bug-reference-sourcehut-instances):
Delete defvars. Those are replaced with bug-reference-forge-alist.
(bug-reference-forge-alist): New variable.
(bug-reference--build-forge-setup-entry): New cl-defgeneric with
methods for github, gitlab, gitea, and sourcehut instances.
(bug-reference--setup-from-vc-alist): Use bug-reference-forge-alist
and bug-reference--build-forge-setup-entry.
* doc/emacs/maintaining.texi (Bug Reference): Mention that the first
group in bug-reference-bug-regexp defines the overlay bounds. Also
mention bug-reference-forge-alist in VCS setup section.