Encode Inf or NaN floats as null for valid JSON.

According to the JSON standard NaN or +/- Infinity should be encoded 
using null. 

Instead the module now raises a ValueError if allow_nan is False.

This is probably not the best solution. 

The default behaviour should be to follow the standard, 
with an optional flag (encode_NaN) to return 'NaN' and 'Infinity'.