mesa: Add a helper function _mesa_unpack_format_to_base_format()