Fix performance regression in `TimeWithZone#to_time`
#25880

ryandv wants to merge ryandv:fix_performance_regression_in_timewithzone_to_time into rails:master

We do not currently have an analysis of these two commits