cursor optimizer doesn't understand that distinct cstring can be an owning type
### Description

running with `valgrind --leak-check=full` results `definitely lost: 11 bytes in 1 blocks` and ```proc `=destroy`(s: OwnedString)``` is never called

```nim
{.
  emit: [
    """

char *allocCString() {
    char *result = malloc(10 + 1);
    strcpy(result, "HelloWorld");
    return result;
}

"""
  ]
.}

proc rawWrapper(): cstring {.importc: "allocCString", cdecl.}
proc free(p: pointer) {.importc: "free", cdecl.}

# -------------------------

type OwnedString = distinct cstring

proc `=destroy`(s: OwnedString) =
  free(s.addr)
  echo "Deallocating OwnedString"

func `$`(s: OwnedString): string {.borrow.}

proc leakyWrapper(): string =
  let ostring = rawWrapper().OwnedString
  $ostring

# -------------------------

proc main() =
  # destructor not called - definitely lost: 11 bytes in 1 blocks
  # doesn't leak with --cursorInference:off
  let s = leakyWrapper()
  echo s

main()
```

expandArc output
```nim
--expandArc: leakyWrapper
var ostring_cursor
ostring_cursor = OwnedString(rawWrapper())
result = $ostring_cursor
-- end of expandArc ------------------------
```

### Nim Version

```
Nim Compiler Version 2.0.8 [Linux: amd64]
Compiled at 2024-07-03
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: 5935c3bfa9fec6505394867b23510eb5cbab3dbf
active boot switches: -d:releas
```

### Current Output

```text
==369541== LEAK SUMMARY:
==369541==    definitely lost: 11 bytes in 1 blocks
==369541==    indirectly lost: 0 bytes in 0 blocks
==369541==      possibly lost: 0 bytes in 0 blocks
==369541==    still reachable: 0 bytes in 0 blocks
==369541==         suppressed: 0 bytes in 0 blocks
```
```


### Expected Output

```text
destructor called and `All heap blocks were freed -- no leaks are possible`
```


### Possible Solution

_No response_

### Additional Information

doesn't leak with `--cursorInference:off`

related forum post:
https://forum.nim-lang.org/t/11996