jruby/jruby — pull request #479 by the8472 (2013-01-05 21:32:57+00:00)
Title: Fix write loss on concurrent ivar table growth

Fixes jruby/jruby#476

Under java8 an inlined and stripped-down version of stampedlock with fences is used, java6/7 use a stamped lock with volatile writes and JVMs that do not support sun.misc.Unsafe will use synchronized blocks for writes.

Note that this code requires oracle java 1.8 to build against for the sun.misc.Unsafe class. I added a stub class in the build_lib dir but that has to be integrated in the build process.
Checks whether the necessary methods are actually available are performed at runtime.

Tested with
```
Java(TM) SE Runtime Environment (build 1.8.0-ea-b70)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b14, mixed mode)
```