[clangd] DefineInline: only trigger on the declaration that has the body (#227534)

The "Move function body to declaration" tweak (DefineInline) is offered on a redeclaration that follows the definition, and then fails when applied.

### Reproduction

```
printf 'void h(void) {}\nvoid h(void);\n' > /tmp/p3.c
clangd --check=/tmp/p3.c 2>&1 | grep -E 'DefineInline|All checks'
```

Before (also reproduces with clangd 17.0.6 and 19.1.7):

```
tweak: DefineInline ==> FAIL: Couldn't find semicolon for target declaration.
All checks completed, 1 errors
```

After:

```
All checks completed, 0 errors
```

### Cause

`DefineInline::prepare` guards on `Source->hasBody()`, which is true for
any declaration of a function that is defined anywhere in its redeclaration chain.
Selecting a redeclaration that comes after the definition therefore
passes the guard. `findTarget()` returns the canonical declaration, which in that order is the definition itself, so `Target != Source` and `prepare` succeeds.
`apply` then looks for a `;` after the definition's body and fails. The fix is to use `doesThisDeclarationHaveABody()`, which is true only for the declaration
that carries the body. The existing test only covered a prototype before the definition, where `Target == Source` masked the wrong guard; this adds the redeclaration-after-definition case.

Following review: also bail out when `Target` is itself a definition
(`isThisDeclarationADefinition()`, covering duplicated and deleted
definitions), and assert that `Source` has a body, since clangd disables
delayed template parsing for the main file.

This change was prepared with the assistance of an AI tool (Claude);
I have reviewed and tested it.

GitOrigin-RevId: 0319ac1a47d24b53c1f3da8b8bb26b931ef48d81
2 files changed