Lua: Bug fix for %feature refunassoc. Walked the array in the wrong direction.
JavaScriptCore: Waypoint for %feature refassoc/refunassoc. This was my initial proposed backend, but I hit a design defect at the very end. JSCore won't let me call JSUnprotectValue in a finalizer. This means this implementation won't work. I'm committing it as a way point because the algorithm is still potentially useful, and also this may work better in v8.
JavaScriptCore: Alternative implementation for backend to support %feature refassoc.

I tried extremely hard to implement this using only the C-API and keep the details hidden/private
    from the user, but I don't think it is possible with JavaScriptCore.
    The fundamental problem is that I don't see any way to make one object hold a reference to another
    from the C-API. The closest thing is JSValueProtect (which you will find my attempt in the commit history).
    But the problem is that JSCore disallows you from calling JSValueUnprotect during the finalizer.
    So it is impossible to break the reference and allow referenced objects to go free when the holding
    object gets collected.
    So this implementation uses JavaScript directly to create a new hidden property (array)
    on the object which will store the references. The normal GC system will handle this correctly.
    The implementation is tricky because JSCore doesn't make it that easy to do what we need.
    Ultimately, we need to call a function that passes objectA and objectB which will create the reference
    array and add objectB to the list.
    But JSCore doesn't just let us pass objectA and objectB to JSEvaluateScript.
    So instead, we need to create a script that returns a function object which contains the implementation
    of what we need to do.
    Then we use that returned function object and invoke it with JSObjectCallAsFunction,
    because this function will allow us to pass our 2 JSObjectRefs for objectA and objectB.
    This works, but does create a visible (array) property: _swigRefAssocList on objectA.

Note: This implementation depends on 'equals' (_wrap_SwigObject_equals) in _SwigObject_functions.
     This relies on C-ptr comparisons which 'equals' does.
JavaScriptCore: Finished implementing refassoc/refunassoc %feature for JSCore.
The public behavior is exactly the same as the Lua version. See usage notes in that commit log.

The V8 version is stubbed. It will print a warning message to stderr and will basically do a no-op when this feature is used.

Also fixed a minor error checking bug in the Lua version.