More image painting fixes:

* 2D image painting support for masking to limit the max contribution of a stroke
  to a pixel, to get it working compatible with projection painting. Not strictly
  a bugfix, but the inconsistency here was annoying.

* Fix python errors in Texture Mask panel in image editor, was missing overlay
  options.

* Clamp paint mask to 0..1 in case some texture exceeds it, this could give black
  pixels due to integer overflow.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56405 954f8c5b-7b00-dc11-b283-0030488c597c