Implement Rect class to replace SDL_Rect

Closes #950