egl/dri2: Factor out context attribute initialization