Teach DoubleRep about NaN/Infinity

Still have to check whether postgres handles them sanely, but the rep
itself will be fine now.