Add apply_as_mask operation

I had a need for an operator like this when I wanted to apply a circular layer mask to an image. I thought it might be useful for others too!

Starting with an image, you create a canvas of the same size with a white background. Then you 'colour in' bits of the new canvas black. Use `mask.apply_as_image(image)` to modify the mask replacing all black pixels with their respective image pixels.
I had it that way round initially, but changed it after I only had relatively few black pixels in my mask image. The difference I guess is in `apply_as_mask` the black pixels are set to the values of the image, and in `apply_mask`, the image pixels are set to 0 if the mask pixel values are white.

Will change it to apply_mask, as that does make more sense, just might be a shade less efficient.