The predictability of fluctuating environments shapes the thermal tolerance of marine ectotherms and compensates narrow safety margins