mesa: Add utility function to get base format from a GL compressed format