Improve JSON conversion of game references

 - Latin1 characters are converted to UTF-8.
 - Numbers and Booleans are decoded.
 - Don't use preg_replace eval mode.

Fixes #1