(core) rendertarget refactor into agp

Current outstanding issues:
Frameserver + 3dbase somewhat broken
and still require GL_HEADERS.

Blending modes do not apply correctly
and some activities does not FLAG_DIRTY.
(core+) blend fix, dirty tracking fix++

Refactoring gl support is now leaving the _video.c
with frameserver + 3dbase left along with the
usual clamping down on regressions. There are things
missing in the platform layer still (particularly
gles3 implementation, vstore/rendertarget canvas resize)
along with possible issues with push/pop ext.
Still this the more difficult and comprehensive layer
refactoring seems to be possible to clear this week.
(core) streaming upload fixes

Moving streaming uploads to a separate platform
layer brought on the expected amount of painful
problems. These should be fixed now, but before
proceeding we should:

a. extend the benchmarking / regression suite
   with a frameserver that counts upwards each
   video update.

b. write a benchmark suite for PBO transfers
   that compares no-alpha-copy flag against
   regular ones.

c. write a regression test that checks integrity
   and sequence of frames where multiple objects
   share the same frameserver (should still only
   update once per frame), along with a  calctgt
   that makes sure the sequence steps are right.

After that, most this refactor needs is to move
out of 3dbase, create GLES2/3 compatible agp
versions and get rid of the GLEW req. for GL21.
(tests) added counter frameserver

Added a simple testing frameserver that
increments RGB (b -> g -> r) with wraparound
per channel every frame. It can be built
as the avfeed frameserver or connect
authoritatively through the database or
non-authoritatively through the ARCAN_CONNPATH
mechanism.
(core+test) added child-ftruncate recovery

A common issue with shared memory between trust
barriers is the possibility of DoS from a client
ftruncating the descriptor connected to the shared
memory. This commit adds a preliminary handler
for that situation by forcing frameserver- sensitive
sections to be marked as such, with a sigjmp based
recovery.
(core) refactored 3dbase, the last of GL_HEADERS

All major paths have now been moved into the
agp layer. Some of the 3d cases are rather
untested, as is the validity of context- management
and launch_external / conservative mode.

Left for this branch now is some regression tests
for multitextured 3d model (i.e. box with
diffuse, text and normal), cleanup in agp/gl21 for
canvas resize and a gles2/gles3 update.
(core+) refactor towards dropping GL_HEADERS hack

This will break several builds, but removing
the dependency to GLEW and started dropping the
need for GL_HEADERS throughout the project.

Added the option for docgen to generate
a vim highlights file, and doc->test generation
almost completed.

Shortened the shmpuncher testcase.
(core+) buildfixes, extended image_children

image_children now has an alternate form where
you can test if a specific vid is a relative
of another.

the buildfixes concern the removal of GL_HEADERS
and subsequent breakage on OSX.
(core+) shader management moved to platform

Moved the shader management to the agp/video platform where
it belongs. Completed dropping GLEW as a dependency and
now managed extension etc. mapping internally.

The EGL-DRI platform now works correctly with GL21
(including the rendertarget / readback parts), though
still not 100% possible to compile-time switch between
EGL3+ and GL21 due to gles3.c not being updated yet.

We are still in a broken state with the libretro frameserver
that should now start using the agp layer rather than its
own GL routines, then we are closing in on merging back to master.
(build) fixes for retro frameserver + egl-dri

Rendernodes "should" work properly now but for
some reason we still can't allocate framebuffer
objects etc. and just fail silently, havn't tried
with an upgraded kernel yet but other calls work.

After that we should be at a stage with working
LWA + retro3d in X-less linux.
(core+) render-node tests successfull

Managed to use arcan_lwa to connect
and draw to an arcan window manager
for multiple hours without any signs
of leaks or unreasonable CPU usage.

This is still, however, with explicit
readbacks, next steps would be adding
support for other sharing mechanisms
(i.e. EGLImage etc.). but interesting
progress nonetheless.
(doc) added constants to vimgen
(darwin) agp / video build fixes

regression caused by glfun/glshared changes
messed up darwin builds as the GL environment
looks somewhat different there.
(core) fix to image_children optarg being explicit
Merge pull request #89 from letoram/rtgt-refact

Merge rendertarget/agp refactor