JIT: fix fsel/ps_sel implementations for NaN input

This fixes Beyond Good and Evil (at the least).

The logic necessary to get the conditions right here is really subtle (I /hope/ I got it right, I tested it in a separate program) and I pounded my head against it for like 3 hours, so I left a detailed comment explaining it.