Better rectangle bounding

IsWithinRectangle() no longer relies on simple offset-coordinate bounds
checking. The output is now consistent across all permutations,
generating one of three row patterns (one symmetrical, two mirrored) as
appropriate to the specified corners.