Introduce segment builder, which is able to handle a much larger
range of clip scenarios than the initial segment implementation.

Instead of only handling the simple case of a single nine-patch
clip, we can now handle any number of local clip regions, and most
importantly, both clip and clip out modes. The support for clip-out
means we can often eliminate large areas of internal pixels for
items such as box-shadows. Note: the box-shadow code is not currently
hooked up to take advantage of this yet.

In the future, the segment builder can quite easily be extended to
handle the remaining clip sources that aren't handled - the image
mask and border corner clip sources.