fix($animate): ensure ms durations are properly rounded

Closes #5113
Closes #5162