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/

Sure, but I wanted to make sure that this bit of code worked so I didn't want to potentially introduce other bugs when I was still testing the whole thing.