Fix #1799: path collections with NaNs in the path cause exceptions in vector backends.
Merge pull request #1799 from mdboom/issue1799

Corrupt/invalid PDF and EPS files when saving a logscaled plot made with negative values