egl: refactor dri2_create_screen() into three separate functions