Fix incorrect fieldtype tfunc (#38148)
`fieldtype_tfunc` was returning `Type` as the widest possible return
value, but this is not correct, since fields of unwrapped DataTypes
can legally be TypeVars. This was in fact causing incorrect execution
in the isdefined_tfunc, though on master it happened to accidentally
do the correct thing. Fix this by returning `Any` rather than `Type`
as the widest type from `fieldtype_tfunc`, but while we're at it,
improve the precision of `fieldtype_tfunc` a bit, such that this
widening doesn't regress inference precision in some important cases.