use libraw to scale colors

and no need to subtract black point, libraw does this
use float x-trans downsample for mipmaps
fix bug in float invert

Don't divide float by 0xffff, that was just pasted in from the int
path. Also, remove debugging code.