Several JsonProvider improvements

*When the RootName parameter is not specified, use "Root" instead of "Entity" as the default name (closes #316)
*Reuse types in JsonProvider (closes #354)
*Improve json error messages to include full path (closes #151)
*Don't generate empty choice types
*Give more general names to heterogeneous types
*Some refactoring to optimize the generated code to be smaller
*Fix unused variable warnings