Fix #34233: bad alpha blending for 3D texture painting. Same changes as the
previous fix for 2D image painting were done, and also:

* For brushes that do masking (keeping the max contribution to a pixel limited),
  the alpha from textures is now part of the mask. In many cases the logic
  worked out the same and where it didn't it used to cause artifacts.

* Color interpolation for smear and soften tools now happens in premultipied
  space, to avoid bleeding of RGB colors from zero alpha areas.

* Fix a few cases where byte <=> float conversion was not doing the proper
  straight <=> premul conversion.

* Replace some float division by constants with multiplications, is faster.

Note: float texture painting seems to have some issues updating the OpenGL
texture, but issue was already there before this commit.

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