Throw json_bad_cast when non-finite float value is given (pficommon #158)

https://github.com/pfi/pficommon/pull/158