gluegen: avoid bugs with sign-extension in readUInt16

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
build/test: Add ant-junit4.jar to classpath; Add experimental gluegen-rt-alt recipe (inactive); Misc ..
PosixDynamicLinkerImpl: cleanup uncommented enums's intendation
UnixDynamicLinkerImpl_JNI.c: Add (inactive) dlopen debug code (helper to analyze llvm-vmkit libGL loading issue)
unit test: preserve hs_err_pid*.log files (move to results folder for archive)
Bug 923: Remove dependency of CStruct annotation processor _generation_ and generated_class_user due to Java8 issues.

Java8's annotation processor as embedded within javac does not allow
referencing not-yet existing generated classes in a class source code
which will produce these generated classes via the annotation process.

Example:

+++
import com.jogamp.gluegen.structgen.CStruct;

public class Lala {
  @CStruct(name="RenderingConfig", header="TestStruct01.h")
  public RenderingConfig config;
}
+++

Above example illustrates that the type 'RenderingConfig'
does not exist at time of processing the annotation.
The type will be created via the annotation process itself.

Even though we pass '-proc:only', i.e. skip java compilation,
Java8's annotation processing via javac fails in such case.

We see this as a bug within javac's annotation processing itself!

+++

This workaround splits the annotation process and using the class as
generated by the former.

To allow this to work, CStruct receives a new field 'jname'
allowing to enforce the java-name of the structure
using a dummy field type like boolean.

  @CStruct(name="RenderingConfig", jname="RenderingConfig", header="TestStruct01.h")
  public boolean dummy;

Further more CStruct can be annotated on the package, i.e. 'package-info.java',
avoiding the dependency problem altogether.
To support multiple header files and types,
'CStructs' has been introduced using an array of 'CStruct'.

  @CStructs({@CStruct(name="RenderingConfig", header="TestStruct01.h"), @CStruct(name="Pixel", header="TestStruct02.h")})
  package com.jogamp.gluegen.test.junit.structgen;

Tests:
  - Build w/ Java7 and Java8
  - Validated 'major version 50' (Java 6) class files (OK)
Eclipse .classpath: Add 'src' 'test/junit'
RunnableTask: Add static method 'invokeOnNewThread(..)' for convenience (Used in JOGL to mitigate Bug 1004)
Unit Test: Added Semantic Version Test (Current version agains v2.1.5)

TestVersionSemantics adds testing of semantic versioning
of 2.1.5 gluegen-rt.jar against the current version within a unit test.

Currently we expect BACKWARD_COMPATIBLE_USER
and need to toggle this to NON_BACKWARD_COMPATIBLE,
if actually perfoming non compatible major or minor version changes.

The latter is allowed right now, since we increment from 2.1 -> 2.2!

- Added https://github.com/jeluard/semantic-versioning semver.jar (Apache License Version 2.0)
Unit Test: Modularize Semantic Version Test / Fix 'excludes'

Refactor base semjar unit test class into
com.jogamp.junit.util.VersionSemanticsUtil, part of new gluegen-test-util.jar.

The new gluegen-test-util.jar shall be used by all other modules to test versioning.
Bump semver.jar to 731db3566b4096ecf6a08a9d33991400e66c5021 (sgothel/jogamp branch): Using direct regexp for excludes
Bump semver.jar to new rebased c4930f9d23ae7515434942836f628f767411876c (0.9.25-SNAPSHOT)
Bump semver 174953022b62681653db1f57b087581e29313f5b
VersionSemanticsUtil: Produce diff stat per-class w/ diff-type-count and dump diffs per diff-type
Bump semver to 9ec2e5329780214d317b026f7c0b086972a94a5c - Using Dumper.dumpFullStats(..)
gluegen: use parseInt, parseLong to avoid boxing unboxing an Integer/Long

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
gluegen: avoid appending Strings in a loop, pull out a Stringbuilder we can reuse

Reuse a single stringbuilder to build all the comment strings and emit them if required.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
gluegen: avoid a suppressed warning annotation by using the ArrayList copy constructor

clone() can't be used without warnigns and is no more efficient that the copy constructor,
replace the call and kill the suppressed warning annotation.  While here, mark the
modifier list as private final.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
gluegen: remove an unreferenced writer variable

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
gluegen: update antlr grammer to produce annotated enum and functionName sets

The annotations are all commented out, uncomment them and reduce the type warnings
during the build.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>