Effect of a fluctuating thermal regime on adult and larval reef corals