ruby: create #to_json_value to handle JSON idiosyncracies

JSON cannot represent NaN, Infinity and -Infinity while XML and YAML
can, so add a special #to_json_value which is mostly #to_simple_value except for
these special cases
ruby: use symbols instead of strings for keys in #to_simple_value and #to_h

Using strings as keys is really awkward. Note that it does not affect
code that is beyond a marshaller such as JSON as symbols are converted
to strings in the process.
ruby: make the special handling of NaN and Infinity an option of #to_simple_value

The current effort of splitting between #to_simple_value and
to_json_value was obviously broken (since #to_json_value was
not going to be called recursively), and fixing it with the same
philosophy would require some serious over-engineering. Simply
make this special handling an option and set the option accordingly
when calling #to_json_value