Throw invalid_argument when non-finite float value is given

Only finite float values are valid in JSON. If `json_float` has inf or nan, it create an invalid json string.
In general, throwing ```bad_cast``` is a bad idea. But the convention throwing ```bad_cast```s is from historical reason. Please respect the convention for compatibility and coherence.