GLStateKeeper: Add clearPreservedGLState()
NewtBaseActivity: Perform cleanup() even on onCreate() due to possible call w/ initialized states (App process is killed for memory exhaustion etc)

.. even though I was not able to reproduce this case, it will not harm.
NEWTGearsES2Activity*: Adding property to enable 'process kill' behavior (memory and killSelf)
Adapt to new version scheme, see GlueGen a3f2ef50ad33c58a240a17fcf03e415d772207c3, etc; Fix NewtVersion, NativeWindowVersion and NewtVersionActivityLauncher

NewtVersion, NativeWindowVersion: Also search for extension javax.media.opengl (all packaging)
NewtVersionActivityLauncher: Use new launcher URI
NewtBaseActivity: Move setVisible(false) from onPause() -> onStop(), since only onStop() declares invisible status. onPause() could imply other non fullscreen activity on top.
Fix Bug 671: Add JPEG Decoder w/o AWT Dependencies

Original JavaScript code from <https://github.com/notmasteryet/jpgjs/blob/master/jpg.js>,
author 'notmasteryet' <async.processingjs at yahoo.com>.

Ported to Java.

Enhancements:
 * InputStream instead of memory buffer
 * User provided memory handler
 * Fixed JPEG Component ID/Index mapping
 * Color space conversion (YCCK, CMYK -> RGB)
 * More error tolerant

+++

Features:
              JOGL   AWT
  RGB          ok     ok
  YCCK         ok     Exception
  CMYK         ok     Exception
  YUV Store    ok     n/a
  Need Y-Flip  no     yes

+++

Benchmark: TestJPEGJoglAWTBenchmarkNewtAWT

  JOGL.RGB Loops 100, dt 1199 ms, 11.99 ms/l
  JOGL.YUV Loops 100, dt  351 ms,  3.51 ms/l
  AWT..... Loops 100, dt 2144 ms, 21.44 ms/l

File:    jogl/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/j1-baseline.jpg
Machine: GNU/Linux PC (AMD 8 core), JavaSE 6 (1.6.0_38)

.++++ UITestCase.setUp: com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGJoglAWTBenchmarkNewtAWT - benchmark
libEGL warning: DRI2: failed to authenticate
0: JPEGImage[261x202, bytesPerPixel 3, reversedChannels false, JPEGPixels[261x202, sourceComp 3, sourceCS YCbCr, storageCS RGB, storageComp 3], java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166]]
0: TextureData[261x202, y-flip false, internFormat 0x1907, pixelFormat 0x1907, pixelType 0x1401, border 0, estSize 158166, alignment 1, rowlen 0, buffer java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166]
JOGL.RGB Loops 100, dt 1199 ms, 11.99 ms/l
0: JPEGImage[261x202, bytesPerPixel 3, reversedChannels false, JPEGPixels[261x202, sourceComp 3, sourceCS YCbCr, storageCS YCbCr, storageComp 3], java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166]]
0: TextureData[261x202, y-flip false, internFormat 0x1907, pixelFormat 0x1907, pixelType 0x1401, border 0, estSize 158166, alignment 1, rowlen 0, buffer java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166]
JOGL.YUV Loops 100, dt 351 ms, 3.51 ms/l
0: TextureData[261x202, y-flip true, internFormat 0x1907, pixelFormat 0x80e0, pixelType 0x1401, border 0, estSize 158166, alignment 1, rowlen 261, buffer java.nio.HeapByteBuffer[pos=0 lim=158166 cap=158166]
AWT..... Loops 100, dt 2144 ms, 21.44 ms/l
++++ UITestCase.tearDown: com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGJoglAWTBenchmarkNewtAWT - benchmark
NewtCanvasAWT: Cleanup up private method calls; Attach/Detach JAWTWindow's SurfaceUpdateListener to NEWT Window when it gets attached/detached.
OSX CALayer minor edit: Call [super setFrame..] directly
JAWTWindow: Issue component.repaint() after attachSurfaceLayer(..), otherwise no rendering result might be visible w/o Animator
OSX/CALayer Threading Part4: Stream all JAWT Root CALayer Operations on OSX Main-Thread

Previous code created, set and unset the root CALayer on the current thread,
which lead to a very delayed destruction of the root CALayer w/.
With Java7 this lead to a possible resource starvation in certain situations,
since Java7 uses an CAOpenGLLayer.

Similar w/  f354fb204d8973453c538dda78a2c82c87be61dc,
creation, set and unset is operated on main-thread.
OSX CALayer/NewtCanvasAWT: Force relayout of component (size +1, size -1) when attaching NEWT Child to avoid false CALayer position.
OSX CALayer Unit Tests: NEWT child is destroyed if NewtCanvasAWT is disposed/removed, due to offscreen/onscreen transition
SWT unit tests: Sort w/ AWT and Headless - Fix threading w/ AWT.

This especially impacts (fixes) Mac OSX.
Merge branch 'master' of https://github.com/gouessej/jogl