…rences"
The goal of this PR is to make [basic-code-intel](sourcegraph/code-intel-extensions#9) an awesome experience when you need go-to-definition, hovers, and find-references when browsing code in any language with no configuration. That means that the initial experience of site admins and users will be much better, because they get to see code intelligence with *much* less setup required.
**Depends on** the codeintellify PR sourcegraph/codeintellify#70. That PR makes it so that codeintellify (which implements our hover tooltip) supports custom actions, instead of hardcoding "Go to definition" and "Find references".
This commit makes the web app and browser extensin make use of that, so that:
1. The "Go to definition" and "Find references" actions work in the same way in the web app and browser extension as all other action buttons. This means those actions are no longer hard-coded in a separate library.
2. These buttons are selectively displayed in a smarter way based on (e.g.) whether there are any registered definition or reference providers for the current document. This fixes the issue where both buttons were always shown if there was a hover, even if the client app knew they would not return anything.
3. The buttons can do smarter things, like opening up the definition panel if there are multiple definitions (instead of just jumping to the 1st definition).
4. Extensions can add their own actions to the hover, such as "Find implementations", "Show history" (eg when a func, or calls to a func, were added/removed in Git history), "Show authors", "Show users", "Show stack traces", etc.
(I initially began implementing this so that basic-code-intel could add "Go to definition (fuzzy)" to the hover using (4), but I think that the improvements in (2) and (3) actually make that unnecessary for basic-code-intel. (It's still important to prioritize precise definitions in the panel; that will come soon.) See sourcegraph/code-intel-extensions#9 for the basic-code-intel changes that make use of this new behavior. (Note that there are *no* new extension APIs added in this PR, just improved handling of what already exists.))