support random sampling of tuple types: add tests (#51630)
This is a rebase of #35856, where we keep only the tests, as the
functionality was added in #50251. This also adds the possibility to
call `rand` on an empty tuple type: `rand(Tuple{})`.
Co-authored-by: Stephan Hilb <stephan@ecshi.net>