ruby: implement a method to convert a type model into a simple ruby value

The goal is that this simple ruby value can be then marshalled in e.g.
JSON.
ruby: define #to_simple_value on Type instances

It converts to a representation that uses only Hash, Array and plain
strings and numbers. This allows to convert values into

In order to save some performance, it is possible to marshal containers
and arrays of numbers into a packed string using the pack_simple_arrays
option. See the method documentation for more details

Note that /std/string is converted to a String already
ruby: fix definition of #to_simple_value on /std/string

It must accept one argument

This fixes rock-core/tools-orocosrb#6
test: fix spurious infinite recursions when running all the tests together
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
Merge pull request #4 from orocos-toolchain/to_simple_value

Define ways to marshal typelib objects (models and values) as simple ruby values
typemodel: make "Type::ValidCategories" be a proper enum-value

and rename it to "NumberOfValidCategories"

"Typelib::Type::ValidCategories" was wrongly set to "Compound+1", a
remnant from 2005 -- impressive by itself ;-) the "Opaque" and
"Container" enums where then added in 2008 without adapting the value of
"ValidCategories". Seems like nobody is using this, so...

setting the start-value of the enum in "Typelib::Numeric" to
"Typelib::Type::ValidCategories" will cause the
"NumberOfValidCategories" in the "Typelib::Numeric" to include the
overall number of valid categories

Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
typelib: fix -Wswitch warnings by throwing in "default" case

(or return "Qnil" for ruby)

after adding a new entry into the type-enum, there popped up some
-Wswitch errors because some "default"s were missing. added some throws.
also removed an assert which nobody can catch at runtime.

removed the "shut up gcc" dummy-return-statement -- does gcc still
complain in 2014?

Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>