Also, be sure the right locale_t is freed if we fail on the second uselocale. Finally, fix test_locale so it *doesn't* use json_object_to_json_string as that will simple re-emit the original parsed string values.
Add json_object_free_userdata() and json_object_userdata_to_json_string() too.