generator: Escape Object key names correctly
generator: Escape Object key names correctly

Also fix empty keys, which are now encoded properly.

https://bugzilla.gnome.org/show_bug.cgi?id=727593

GNOME/json-glib,Distrotech/json-glib,frida/json-glib,ebassi/json-glib,GNOME/json-glib,frida/json-glib,Distrotech/json-glib,ebassi/json-glib,Distrotech/json-glib,ebassi/json-glib