Patch of http://sourceforge.net/p/swig/mailman/message/29816385
Fix shared data problem on MacOS 10.9 with xcode 5.1

Move to construct on first use idiom for singleton definition,
which prevents problems with singletons between ruby swig modules
in an environment with multiple modules on MacOS 10.9 with xcode 5.1.

Before this fix, data was being shared between modules which caused
a crash on shutdown of the ruby interpreter if more than one
module was loaded at a time.
Fixed JSClassRef declaration not using the static one

The class descriptor is not assigned to the static variable but to a local one, which makes the global variable unused.
Fix issue with relative import when using single header file import.
  -- The commit propagates the package option to the newly create
     module node so it is recognized by SWIG
  -- Added a relativeimport test for this combination
     (in lack of py3 I was not able to test it with py3 but it
      "should just work")
Initialize C++ arrays created by array_functions' new_foo().

`array_functions(TYPE, NAME)' generates a `new_foo(size)' function that
allocates a new array of the given type.  When compiling in C, the array
is initialized with `calloc()', which shows that the intent was to have
the array be zero-initialized.  When in C++, however, the array was not
getting initialized, so it could contain random garbage after creation,
when the type was a POD type.

This change makes `new_foo(size)' create a value-initialized array when
in C++, as per the C++ standard's 5.3.4.15 that says that adding a pair
of parentheses at the end of a new-expression does that.
fixup! Patch of http://sourceforge.net/p/swig/mailman/message/29816385
Fix bug 206 where package information for relative in single file import is not propagated correctly.
* Fixed typo --with-jsv8inc and --with-jsv8lib * Fixed locating of libv8 on osx
Allow to specify V8 version, for example

 V8_VERSION=0x031511 ENGINE=v8 make check-javascript-examples
Allow to specify V8 version, for example:

 V8_VERSION=0x031511 ENGINE=v8 make check-javascript-test-suite
Fixes for v8 3.15.11 (0x031511)
Fixed buffer overrun
Fixes for v8 3.17.10 (0x031710)
Allow to compile for specific V8 version
Fixes for v8 3.17.10 (0x031710)
Fixes for v8 3.19.2 (0x031902)
Fixes for v8 3.19.18 (0x031918)
Fixes for v8 3.21.17 (0x032117)
Fixed for v8 3.25.30 (0x032530)
Partially fixed for 3.25.30 (0x032530) - unfinished