Remove infinities from Animation::TimeToEffectChange()

This method was using std::numeric_limits<double>::infinity() to
represent an animation that was no longer in effect. Instead of
using infinities we could better change the return type to
base::Optional<double> and simply return base::nullopt instead
of the infinity value.

This will ease the transition to using AnimationTimeDelta instead
of a double.

Bug: 737867
Change-Id: Icc42f983cd4d1639b84d4d82673e2d6591a09827
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1751242
Commit-Queue: Sergio Villar <svillar@igalia.com>
Reviewed-by: Alan Cutter <alancutter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687599}
4 files changed