Moved 3d_render_src contents into src

To simplify building and debugging the 3D rendering code, I moved it
into the main src/ directory. This breaks the AIR 2.6 build, but an
upcoming change will fix that.

Conflicts:
	3d_render_src/IRenderIn3D.as
	src/Scratch.as
	src/render3d/DisplayObjectContainerIn3D.as
Reformatted code

Conflicts:
	src/render3d/DisplayObjectContainerIn3D.as
Wrapped 3d code with conditional compilation flag

The 'SCRATCH::allow3d' flag now controls 3D-related code.

Conflicts:
	src/Scratch.as
	src/render3d/DisplayObjectContainerIn3D.as
	src/render3d/ScratchTextureBitmap.as
	src/scratch/ScratchSprite.as
Fixed Ant build WRT SCRATCH::allow3d compile flag
Fixed improper 'this' in bitmap2d() local function

Thanks @sclements for finding this problem
Updated Travis build file to build with/without 3D
Added missing function(){} wrapper
Updated AGALMiniAssembler and added AGALMacroAssembler

Obtained from https://github.com/adobe-flash/graphicscorelib
Moved shader code into embedded files

Conflicts:
	src/render3d/DisplayObjectContainerIn3D.as
	src/render3d/shaders/fragment.agal
Fixed parsing line comments containing semicolons

Also squashed a warning and improved readability of code in flight.
Fragment shader ifdefs for effects and sampler count

This change also switches fragment shader compilation to use the
AGALMacroAssembler.

Conflicts:
	src/render3d/DisplayObjectContainerIn3D.as
	src/render3d/shaders/fragment.agal
Track activated effects and build minimal shader

Seems to work in most cases but needs more testing; there are probably
cases where the effect refcount can become inaccurate.
Still to do: allow reuse of previous (cached) assembler output and
consider binding fewer texture samplers when possible.

Conflicts:
	src/render3d/DisplayObjectContainerIn3D.as
Cache shader sets based on a calculated ID

The ID is calculated from the number of textures to be sampled and the
active effects.
The cache is flushed if the context is lost and (re)populated on demand.

Conflicts:
	src/render3d/DisplayObjectContainerIn3D.as
Added support for comparison operators
Converted shaders to macro syntax

Both the vertex and fragment shader are now built with the AGALMacroAssembler.
Also any errors during assembly are now reported through logMessage, which goes to Raven/Sentry in online builds.

Conflicts:
	src/render3d/shaders/fragment.agal
Don't try to use swizzle on output registers

AGAL doesn't support swizzing the components of the register used for
the output of an operation. This change fixes the one place that was
relying on output swizzle (introduced in the previous commit) and
removes cases where the code implies output swizzle but works without.
Use symbolic names for vertex attributes

Conflicts:
	src/render3d/shaders/fragment.agal
Pack texture ID with the other required attributes

The fragment shader can now treat v0 and v1 as dedicated to
always-required attributes in a stable layout. The layout of the v2 and
v3 registers will vary depending on which effects are in use.

Conflicts:
	src/render3d/DisplayObjectContainerIn3D.as
Minimize the size of the vertex buffer

The vertex buffer no longer contains data for an effect unless that
effect is used (non-zero) somewhere in the vertex buffer. The vertex
shader passes along only those vertex attributes which are filled, and
the fragment shader uses aliases to map effect attributes to varying
registers differently depending on which attributes are present.
Also fixed a bug where updateEffects() was not being called when using
the "clear graphic effects" block.
Also cleaned up some old dead code.

Conflicts:
	src/render3d/DisplayObjectContainerIn3D.as
Cleaned up index & vertex buffer resize code

Conflicts:
	src/render3d/DisplayObjectContainerIn3D.as