sad/ssd for ColorType images

This also fixes any overflow problems on julia 0.4.