Tolerate NaN in the geometry without asserting

If we come across NaN geometry, we treat it as spanning
the entire viewport, similar to other geometries with
undefined geometry.

Task-number: QTBUG-34520
Change-Id: Ia4171f9f13d876c6c587043ad7decaa19bb85f01
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>