[SLP]Fix demotion of nodes reused at a wider width
Count shared cast scalars in the demoted width, use the node
signedness and the user width in the unsafe-user check, and round
sub-byte widths to i8. Otherwise gathers and wider users get
sign-extended narrow lanes, which gives wrong values or poison.
Fixes #246337
Pull-request: https://github.com/llvm/llvm-project/pull/246423