Multiple draw buffers implementation

Implemented the missing pieces for multiple draw buffers support:
- Fixed Context::getScissoredImage() to use the drawbuffer
  parameter properly
- Enabled setting multiple render targets
- Added dynamic indexing of gl_FragData using a new dynOut flag
  to figure out which channels are being written to.

Change-Id: Id3d95c46a980a698f71e99f7781cc6287e880e9d
Reviewed-on: https://swiftshader-review.googlesource.com/4220
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/Renderer/PixelProcessor.cpp b/src/Renderer/PixelProcessor.cpp
index 0803291..ca26106 100644
--- a/src/Renderer/PixelProcessor.cpp
+++ b/src/Renderer/PixelProcessor.cpp
@@ -938,7 +938,7 @@
 		                       (context->colorWriteActive(2) << 8) |
 		                       (context->colorWriteActive(3) << 12);
 
-		for(int i = 0; i < 4; i++)
+		for(int i = 0; i < RENDERTARGETS; i++)
 		{
 			state.targetFormat[i] = context->renderTargetInternalFormat(i);
 		}