Consolidate compilation conditionals around types

By writing a static method `GetTypeInfo` that just returns the passed in
type when `SIMPLE_JSON_TYPEINFO == false` we can use the same code for
both values of the conditional compilation constant
`SIMPLE_JSON_TYPEINFO`.