GoToDefinition returns all declaration results (implicit/explicit) that are
in the same location, and the results are returned in arbitrary order.
Some LSP clients defaultly take the first result as the final result, which
might present a bad result (implicit decl) to users.
this patch ranks the result based on whether the declarations are
referenced explicitly/implicitly. We put explicit declarations first.
This also improve the "hover" (which just take the first result) feature
in some cases.
NIT: maybe call Occurence instead? As this is actually a Decl with some extra data, computed based on the expression it originated from. Occurence seems like a nice that for that kind of thing.