Safe visibility-aware `as` casts for `repr(transparent)` references

Thanks, that's exactly what I was looking for!