TINYGL: Dirty rects system.

This PR contains an implementation of dirty rects system.
You can find more information behind the design and implementation in the following blog posts: 
http://subr3v.blogspot.co.uk/

As there are a lot of these template parameters, and they behave a bit differently than normal variables, perhaps we should have a different naming scheme for them than normal variables. Perhaps use the same scheme as compile time constants, as that's more or less what they are in this case. @aquadran thoughts?