Remove unused invalidate_rect code

This is dead code; should we remove it, or are there plans to use it sometime soon?

r? @pcwalton