Gets an unsigned integer from a variant, handling both 't' and 'x' types.
a Variant
integer, or 0 if not valid