Add some helpers to Rect

These will be used in rust-layers to simplify some things.