Reference count FrameCapturers. Closes #108
Force texture format to typed one for pixel history.
Fix for crash report - check that event label is non-null
Catch & ignore InvalidOperationException when scrolling

* Fix for a crash report - this exception can be thrown sometimes if the
  window is really small.
Implement custom printf function, use it in favour of OS *printf

* Custom printf supports UTF-8 and in fact assumes it implicitly for all
  strings. This means we can use UTF-8 everywhere, even on windows, without
  widening parameters to printf() style functions like RDCLOG et al.
* It also allows me to add size_t support and binary printing.
* Grisu2 is used for converting doubles to strings. Reference:

Paper: http://florian.loitsch.com/publications/dtoa-pldi2010.pdf
impl: https://github.com/floitsch/double-conversion
impl: https://github.com/night-shift/fpconv
impl: https://github.com/miloyip/dtoa-benchmark
Refactor log printing to use new custom printf.
Use UTF-8 everywhere possible and only use wchar_t where required.

* This means that all APIs pass byte string types. ALL strings everywhere
  in the entire codebase must be assumed to be and treated as UTF-8 content
  not ASCII.
* Gets rid of all the horrible %hs specifiers that caused warnings on
  linux! Hooray.
* We convert to wide strings, or use wide characters, only when necessary
  to use the Win32 API. Some windows specific code will stay in wide chars
  just for convenience.
* Files are already serialised as UTF-8 strings for linux/windows binary
  compatibility, so this change doesn't break backwards compatibility.
Bugfix - function doesn't take wchar_t* any more!
Make sure to specify buffer size large enough for NULL terminator
Add glActiveShaderProgram and direct glUniform* to right program
Add glClampColor and glReadnPixels

* glClampColor doesn't have to be serialised as it only affects
  glReadPixels (which aren't serialised).
Implement glInvalidate* just by marking resource as GPU dirty
Add 2D multisampled array texture storage functions.
Add some missing hooked gl state functions

* glClipControl, glProvokingVertex, glPrimitiveRestartIndex,
  glDepthRangeIndexed, glClearDepthf
Implement glDrawRangeElementsBaseVertex
Implement glFramebfuferParameteri