Guard point transforms against possible division by 0

We were getting infs generated from valid input because of the division by w.

Since we were using the Imath implementation, I had to copy it into our headers.