Update to OpenTK trunk r1978.

This moves the e.g. OpenTK.Graphics.GLES11.* types into OpenTK.Graphics.ES11
(ditto for GLES10->ES10 and GLES20->ES20).  Aside from a namespace change,
this also re-cases many enumeration values, e.g. All.Colorbufferbit is now
All.ColorBufferBit (as it should be).

The GL types are now named ES.

The biggest change is to OpenTK.dll itself: OpenGLESSample only tests the ES11
types (ignoring everything else), and manually patching to add '#if IPHONE'
after every update is annoying, so instead of trying to include as much of
OpenTK as is possible, we're including as *little* of OpenTK as possible.

This amounts to the OpenTK.Graphics.ES*.* types and the
OpenTK.Platform.Utilities type.

I'll gradually move in the previous functionality once it's properly
refactored for minimal dependencies with upstream support (to minimize manual
changes).

OpenGLESSample is updated to cope with all of the above (mostly a s/GL/ES/g
operation).
Remove System.dll dependency.

This involves replacing SortedList<TKey,TValue> with Dictionary<TKey,TValue>
and removing use of Stopwatch.
Fix build errors caused by moving to the 2.1 profile.

Debug.Print()/etc. don't exist (and is in System.dll anyway, which is a
dependency we want to avoid).
* OpenGLES/OpenTK/**/*: Rework OpenTK.Graphics.ES*.GL type initialization to better match where upstream is heading. Currently, before calling any GL methods you must call GL.LoadAll(). Now, you must instead create a GraphicsContext via Utilities.CreateGraphicsContext(), which will call GL.LoadAll() on your behalf (and any other initialization code that OpenTK requires), e.g.: using (var c = Utilities.CreateGraphicsContext(null, null, 1, 1, 0)) // use GL methods here. The '1, 1' parameters are the GLES version to use; replace with '2, 0' to use GLES 2.0.
* OpenGLES/OpenTK/Platform/Utilities.iPhone.cs: Add a Utilities.CreateGraphicsContext(EAGLRenderingAPI) overload.
* API.cs: The argument to EAGLContext.SetCurrentContext() can be null. * OpenGLES/Makefile.include: Deal with renames. * OpenGLES/OpenTK.patch: Add patch to FrameEventArgs so that the Time property can be 0 (which it will be during the first event). * OpenGLES/OpenTK/Platform/iPhoneOS/iPhoneOSGameWindow.cs: Rename to iPhoneOSGameView.cs. * OpenGLES/OpenTK/Platform/iPhoneOS/iPhoneOSGameView.cs: Finish sufficiently so that OpenGLESSample can be migrated to use it. * OpenGLES/OpenTK/Platform/iPhoneOS/iPhoneOSGraphicsContext.cs: Implement .SwapBuffers().
* OpenGLES/OpenTK/Platform/iPhoneOS/iPhoneOSGameView.cs: Don't intermix GLES 1.1 and GLES 2.0 method calls when a GLES 2.0 context is requested. Not sure if this is needed, as we currently lack a GLES 2.0 sample, but some docs I've read suggest that you shouldn't intermix the two, e.g.

		"...the iPhone SDK will allow a program to compile and link
		with calls to both OpenGL ES 1.1 and OpenGL ES 2.0 functions.
		However, in order for these calls to actually be able to
		execute, one must request the appropriate context."
	  	- http://www.opengles-book.com/OpenGL_ES_20_Programming_Guide_iPhone_eChapter.pdf
Remove hasBeenCurrent.

The entire logic is faulty (and I'm not sure why the GLPaint demo even has it
in the first place).

The problem is that if the iPhoneOSGameView has CreateFrameBuffer() invoked
multiple times (as is the case in e.g. OpenGLESSample, as both
FinishedLaunching() and OnActivated() will cause it to be invoked), on the
second (and subsequent) invocation we'll call
gl.BindFramebuffer(All.FramebufferOes, oldFramebuffer), which is BAD as
'oldFramebuffer' is an INVALID framebuffer (as there was only ever one, and it
was destroyed before the "current" CreateFrameBuffer() invocation).

The result is annoying: if you override CreateFrameBuffer() to e.g. add a
depth buffer, the glFramebufferRenderbufferOES() call will fail, because the
framebuffer it's trying to attach to is the invalid one "restored" earlier!

For 1.0.x MonoTouch code, the workaround is to add the following code before
the GL.Oes.FramebufferRenderbuffer() call:

	GL.Oes.BindFramebuffer(All.FramebufferOes, base.Framebuffer);

After this change, the above line of code won't be necessary (but won't break
anything either).
Complete the OpenGLES.framework binding.

  - Update OpenTK sources to OpenTK trunk r2015.
  - Don't use the OpenTK ES11/ES20 definitions, but instead use the
    ES11.iPhone and ES20.iPhone definitions as generated by HeaderToXml.exe
    and Bind.exe.
    - Remove '<token name="API" value="extern" />' from signatures.xml as it
      generates a compiler error (there is no Extern variable).  (Technically
      the presence of this is a bug in HeaderToXml, but I can't think of a
      decent way to prevent this so stripping it out in the Makefile works...)
  - Update the samples to use the new definitions (due to removal of the
    iPhoneAll enumeration type, as the contents are now in the All enum).
  - Prevent spurious 'svn diff' differences in OpenGLES/Bind.
* OpenGLES/Makefile.include: Specify the codepage when building Bind.exe, otherwise we get build errors. Change the built sources. * OpenGLES/**/*: Update to OpenTK r2350.
* OpenGLES/OpenTK/Platform/iPhoneOS/iPhoneOSGameView.cs: TimeSpan.FromSeconds() has a resolution of 1ms, which isn't accurate enough to represent 60fps (0.017s instead of 0.016667s; the error adds up). Use the TimeSpan(long ticks) constructor instead so that we have higher accuracy.
* OpenGLES/OpenTK/Platform/iPhoneOS/iPhoneOSGameView.cs: Remove Console.Error.WriteLine() calls.
Improve OpenTK startup performance.

OpenTK startup (e.g. Utilities.CreateGraphicsContext() execution time) was
being slowed down by the large amounts of Reflection necessary to initialize
the GL.Delegates members, adding ~1s to *warm* startup.

Instead of generating the GL.Delegates type (and using large amounts of
Reflection to initialize its members), we instead have the GL type directly
invoke the GL.Core P/Invoke declarations.  This results in ~0.3s warm startup.
Fix the type of the GL.Core.GetSharederInfoLog() 'infolog' parameter.
mv monotouch/monotouch monotouch/src to be more in line with other projects (most notably MonoMac)
A couple changes to iPhoneOSGameView:

1) in public void Run(double updatesPerSecond)
      throw ArgumentException if updatesPerSecond < 0

2) public override void WillMoveToWindow(UIWindow window)
	add code to suspend/resume the timer instead of just Stop'ing when window == null.

	add further checks to make sure that the UIWindow/CALayer hasn't changed from when
	the frame buffer was created. If either has, recreate the framebuffer.

	This allows cases where a GameView is removed from/re-added to the view hierarchy
	(as in Nikolai's case with a modal view being presented on top of the game view)
	to be completely transparent to the user's code.  The GL render loop stops while the
	view is obscured, and restarts when it's made visible again.  all without any
	heavyweight user code.
correct indentation on this file.. it's using 1) spaces, and 2) 4 space tabs.
destroy the framebuffer before recreating it.
Implemented Run using DisplayLink instead of timers

Also added Run(int frameInterval) for a more direct-mapping
to CADisplayLink.
Reverted Run(double updatesPerSecond) back to old behavior