JIT: allow slightly more general promotion of structs with struct fields (dotnet/coreclr#22867)
For a while now the jit has been able to promote an outer struct A with an
inner struct field B that itself has a single non-struct field C, provided
that C occupies all of B and that C and B are pointer-sized.
For example, this comes up when supporting promotion of `Span<T>`, as a span
contains a `ByReference<T>` field that itself contains a pointer-sized field.
This change relaxes the constraints slightly, allowing B and C to be less than
pointer sized, provided C still occupies all of B, and B is suitably aligned
within A.
Doing so allows promotion of the new `Range` type, which contains two `Index`
fields that each wrap an `int`. This improves performance for uses of `Range`
for simple examples like those in dotnet/coreclr#22079.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8f5bf71321ca29dcd9c5847185e15c0b7fb9a8e7