Define GObject properties and fields as JS properties
We currently implement GObject properties and fields using SpiderMonkey's getProperty and setProperty hooks, where we intercept the JS get or set operation and provide our own value by accessing the GObject.
These hooks are being removed in SpiderMonkey 60, so we need to do something else. An idea is to lazily define a JS property for each GObject property or field, when it is accessed in a resolve operation. We could also predefine the JS properties as we do for GBoxed.
This requires using API from the "JS Friend API" (as we do in GBoxed) to pass private data to the getter and setter functions.
It also causes one change in behaviour. It won't be possible to tell whether these getter and setter functions with private data are running in strict mode or not. The standard JS behaviour when trying to set a readonly property is to ignore it, but throw an exception in strict mode. We will have to always throw an exception, or always ignore it. (It's worth noting that ES6 modules !150 (closed) are by definition always in strict mode, so if we change it to always throw an exception, that's a change that people will have to go through anyway when they migrate to ES6 modules.)