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/

I don't like the "crash" idea, but calling error would be good. (Although, IMHO, it should be feasible to rescale the allocations, dropping a single frame while doing so).