util/u_format_s3tc: handle srgb formats correctly.
Instead of just ignoring the srgb/linear conversions, simply call the
corresponding conversion functions, for all of pack/unpack/fetch,
both for float and unorm8 versions (though some don't make a whole
lot of sense, i.e. unorm8/unorm8 srgb/linear combinations).
Refactored some functions a bit so don't have to duplicate all the code
(there's a slight change for packing dxt1_rgb, as there will now be
always 4 components initialized and sent to the external compression
function so the same code can be used for all, the quite horrid and
ad-hoc interface (by now) should always have worked with that).
Fixes llvmpipe/softpipe piglit texwrap GL_EXT_texture_sRGB-s3tc.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>