Implement contains for other rectangles

This is part of #11.