Fix clip_path_to_rect, add convenience method on Path object for it

Aternative to #1777.  Properly closes the paths returned by clip_to_rect and adds a new clip_to_bbox method to Path that returns a Path object.  Adds a test that tests clipping compound paths and multiple subsegments.