(Bug 2687) Add a wrapper around JSON to handle text encoding

Original LJ::JSON module by ailyin at LiveJournal. Some modifications
made to the API so that it matches behavior of the JSON module for
to_json and from_json.

Also add test with non-ASCII text