st/mesa: use GLbitfield in st_state_flags, add comments