Auto merge of #1296 - mephisto41:ensure-numbers-arent-nan-or-infinite, r=kvark
Auto merge of #1296 - mephisto41:ensure-numbers-arent-nan-or-infinite, r=kvark

Ensure the result of calculation is finite number.

In this [test](https://searchfox.org/mozilla-central/source/dom/animation/test/crashtests/1272475-1.html), we create a very large transform which exceed max of float. This results many NaN or infinite numbers. If we don't handle it, the partial_cmp with Nan or infinite numbers would cause crash.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1296)
<!-- Reviewable:end -->

servo/webrender,servo/webrender,servo/webrender,servo/webrender,servo/webrender,servo/webrender