First pass at bitmap mask support

This is functional but shouldn't be merged as-is.  I'm sending a PR because it's been sitting around in a "good enough for now" state for a while and I want to make it available if anyone wants to work on it (or use it as-is), rather than having it be lost on my drive.

This implements bitmap masks, which applies a layer's mask to the bitmap when it's converted to an image.  It doesn't provide any interface to read or manipulate the mask directly, but it's enough to handle the common case where you just want to get the flattened layer pixels.  Note that the mask enabled flag is ignored; masks are always applied.

This only looks at ChannelID.USER_LAYER_MASK.  I don't know what REAL_USER_LAYER_MASK is, so I left it unhandled.

This is missing:

- extract_composite_image support.  The data flow here is different from extract_layer_image, and I haven't looked at what to do here.
- There are no tests.

The API shouldn't throw an exception on as_PIL for random things like the bounding box of the layer being 0x0.

Also, we'd have to test it in several places internally, for example to check if a mask's size is 0.  It's simpler to just make it so it works instead of having to keep checking for it.  It might be cleaner to just use a different function name for the frombytes wrapper, I only did it this way to reduce the number of changes (there are four calls in this function).