encode NaN and Infinity as null

The JSON standard mandates that NaN and Infinity are encoded using null. I have updated the default behavior to match this. The encode_nan flag will revert to the old default behavior. The allow_nan flag is ignored and passing NaN or Infinity will not generate a ValueError anymore.