Copied the Java 7 AQS to be almost exactly the same as the original, except in a different package and using UnsafeProvider.getUnsafe()